Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
ljw1004
Jan 18, 2005

rum

Hoborg posted:

But that sounds like normal synchronous programming to me. Where's the async?

Asynchronous means "a- [not] synchronous [at the same time]", no more, no less. In the case of Rx it means that the delegate you set up to handle the event gets handled at a later time.

What's special about Rx isn't this basic control flow. What's special about Rx is its combinators -- the ability to combine streams of events in powerful ways.

Adbot
ADBOT LOVES YOU

Milotic
Mar 4, 2009

9CL apologist
Slippery Tilde

Hoborg posted:

I must apologise for refusing to stop living in 2005 (.NET 2.0 forever!) but can someone explain, very quickly, what Rx is and what it enables/allows developers to do that they couldn't do before?
...

Today I'm finding myself doing LoB applications and stateless web-services. How will Rx help me? Am I in the target audience?

Rx? Possibly not. It's great for combining events, or filtering them, or applying logic to them or taking a batch of them and munging them together. You might not need to do that. It is in effect taking the same concept from LINQ and applying them to events (but because of the asynchronous nature there's differences).

But you really, really should be learning .NET 3.5 and LINQ. Once you've grokked it and lambda expressions, it increases your productivity and lets you do stuff you couldn't easily do before. If you're working with collections of object at all (hint: almost all .NET developers will), you should know LINQ.

ether
May 20, 2001

Due to circumstances we have to redesign quite a bit of our core architecture. We are looking to use an ORM of some sorts and are compiling a shortlist of feasable solutions that fit our bill. They should be able to do the following:
- runtime configuration (the entire schema is not available compile-time)
- tunable to some extent (using SQL server)
- lots of tables and fields (approximatly 800 and 9000 respectivly)
- caching

NHibernate and EF or on the shortlist currently, as is LLBLGen Pro. But are there any hidden gems that we've overlooked and people are more then happy with.

Milotic
Mar 4, 2009

9CL apologist
Slippery Tilde
How performant does it need to be, and what are the use cases? As examples:

nHibernate has/can have an amazingly godawful 'warm-up' time whilst it builds the session factory (I've seen 10s stuff). For long running processes, or a web server where the session factory never goes out of scope this is not a problem. During Dev it can really piss you off though. It's also beginning to feel like an amazingly crufty piece of poo poo nowadays.

EF is great for stuff where you're reading a lot, with the odd write. It is completely utter balls if you're doing *lots* of writes to the database in a short-period of time / continuously, since it reads once, writes and then reads back into memory. It also has a wonderful habit of exploding if you try to serialise objects over a wire once you've disposed of the associated object context.

I guess my main point is how "tunable" is "tunable". With EF can you always used stored procedures and there is some tuning, but it's worth identifying the parts where performance is critical and hand cranking your own stored procs and whatnot. The price you pay for EF's ease and auto-gen is performance. That's just how these things work. It's still a godsend for most stuff though.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Milotic posted:

nHibernate ... It's also beginning to feel like an amazingly crufty piece of poo poo nowadays.

How so? I'm not disagreeing, just curious. I've recently realized that although I've been using nHibernate for a year or so, I've barely scratched the surface of what it can do.

RedDragon
Jul 22, 2005

I'm not gay or anything... but 10 bucks is 10 bucks.
Does anyone have a solid WPF / C# Project that can be used as a starter-kit / skeleton project?

I have looked at all the solutions available on https://www.codeplex.com and gallery.expression.microsoft.com - yet, none seem suitable.

I am starting a new project and I know this would help me out tremendously. I am no UI designer, so having a starter-kit project with some WPF designs would be of great benefit.

If anyone knows of any resources for WPF (XAML) designs and templates, let me know! :)

ether
May 20, 2001

Milotic posted:

How performant does it need to be, and what are the use cases? As examples:
For a more complete picture of the why. Our current server solution is a Delphi-based UI-less desktop app with many many hardcrafted SQLs that are tuned to the T. (straight out of coding horror, I know) This is a trainwreck waiting to happen, we know it and after 18+ months of saying so management finally gets that also. The downside is to solve this an external guy is kickstarting/leading the project, and he is well-versed in huge enterprise solutions and Java (where we are only a small/medium shop with 20 developers and only use Delphi and .NET) Personally I think he's a great guy but way to focused on using commodities/stuff in his comfort-zone.

Using an ORM is being pushed where I have some serious doubts wether this will not end up making it harder to program in addition to severly underperforming. Because we are basically rewriting a large portion of the app in .NET we are also bound to how it works currently to some extend. In addition, the size of the workload means that developer-productivity is gonna be really important to keep things going.

That's where the shortlist comes in, proof-of-concepts will be made that try and mimic the complicated parts of the current app so we can compare SQL-performance, .NET overhead and developer-productivity. Just looking for products to extend the list with so we are not stuck with the big 3.

Milotic
Mar 4, 2009

9CL apologist
Slippery Tilde

Ithaqua posted:

How so? I'm not disagreeing, just curious. I've recently realized that although I've been using nHibernate for a year or so, I've barely scratched the surface of what it can do.

You have to handcrank a lot of the DAL/Connection code yourself, and writing the POCOs and HBMs is always annoying. (I guess LLBLGen pro and other stuff can do this, but where I used to work, acquiring new software was a long tedious affair). HQL is a bit of a pain. This sounds weird, but because it's so similar to SQL, you try stuff and it turns out to be illegal syntax. Lazy loading of stuff can mean you have to test your relationships thoroughly - stuff can blow up when you try to access it.

I'd say up until EF4, it was the best ORM out there, but for me, EF4 edges it out now (which still has its own quirks/issues though). It comes down to enjoyment. I have never felt enjoyment or relief when writing (quite a few) nHibernate based DALs, whereas I have with EF.

RedDragon posted:

Does anyone have a solid WPF / C# Project that can be used as a starter-kit / skeleton project?

I have looked at all the solutions available on https://www.codeplex.com and gallery.expression.microsoft.com - yet, none seem suitable.

I am starting a new project and I know this would help me out tremendously. I am no UI designer, so having a starter-kit project with some WPF designs would be of great benefit.

If anyone knows of any resources for WPF (XAML) designs and templates, let me know! :)

http://compositewpf.codeplex.com/ aka "PRISM" has some quickstarts you might want to use/copy and rename the poo poo out of. Look for the BasicMVVM quickstart sample. Don't worry about the Unity stuff, or Module loading or any of that stuff just yet.

Also make sure you get the WPF Toolkit

e: The thing about WPF/Silverlight is that you can go as customisable as you want, so if something looks poo poo during the first pass, you can fix it relatively easily later, as long as your conceptual model is right.

Milotic fucked around with this message at 10:03 on Jul 3, 2011

RedDragon
Jul 22, 2005

I'm not gay or anything... but 10 bucks is 10 bucks.
Yeah I've been using PRISM for another project. Takes forever to do the simplest things, however, it de-couples modules extremely well. For my new project, I may not be using PRISM since I am partnered with someone who is not familer with PRISM. Learning PRISM would shave off time in our scope of a limited-amount-of-time.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
I have a main application thread that needs to do some semi-important work every 16ms or so and a giant number crunching task that I want to throw on another thread. I put the number crunching thing into a BackgroundWorker and then used Parallel.For to mash the data around - the speedup is amazing but with all processor cores pegged at 100% the main application thread timing is becoming jittery as hell.

As far as I know you can't (and shouldn't) mess with the priority of the ThreadPool threads, is there any other way to tell them to chill out a bit and let the main thread have a bit more CPU time?

consensual poster
Sep 1, 2009

ether posted:

For a more complete picture of the why. Our current server solution is a Delphi-based UI-less desktop app with many many hardcrafted SQLs that are tuned to the T. (straight out of coding horror, I know) This is a trainwreck waiting to happen, we know it and after 18+ months of saying so management finally gets that also. The downside is to solve this an external guy is kickstarting/leading the project, and he is well-versed in huge enterprise solutions and Java (where we are only a small/medium shop with 20 developers and only use Delphi and .NET) Personally I think he's a great guy but way to focused on using commodities/stuff in his comfort-zone.

Using an ORM is being pushed where I have some serious doubts wether this will not end up making it harder to program in addition to severly underperforming. Because we are basically rewriting a large portion of the app in .NET we are also bound to how it works currently to some extend. In addition, the size of the workload means that developer-productivity is gonna be really important to keep things going.

That's where the shortlist comes in, proof-of-concepts will be made that try and mimic the complicated parts of the current app so we can compare SQL-performance, .NET overhead and developer-productivity. Just looking for products to extend the list with so we are not stuck with the big 3.

You might want to consider one of the new "Micro ORM" libraries, like Dapper or PetaPOCO. They don't have the features of a heavy ORM framework like EF or NHibernate and they require that you have people on your team that know SQL, but they are light-weight, fast (almost as fast as hydrating objects manually with a DataReader), and easy to learn.

wwb
Aug 17, 2004

ether posted:

Just looking for products to extend the list with so we are not stuck with the big 3.

Not sure if it is being considered, but have you thought about some of the nosql solutions floating about? Why map tables to objects when you can just save objects. These things start to make more sense when you have requirements like dynamic schemas.

Personally, I'm a big fan of RavenDb -- it s a .NET document database that is designed by some of the same guys who brought you nHibernate. Also has some pretty good sql integration so you can dump stuff to sql server if you've got, say, lots of reporting sitting there.

There are a number of other options in the wild as well.

Milotic
Mar 4, 2009

9CL apologist
Slippery Tilde
Legacy apps with 800 SQL tables and numerous optimised Stored Procs being migrated in a difficult upgrade project is not the best place to introduce the new, mostly untested hotness.

ether
May 20, 2001

wwb posted:

Not sure if it is being considered, but have you thought about some of the nosql solutions floating about? Why map tables to objects when you can just save objects. These things start to make more sense when you have requirements like dynamic schemas.

Personally, I'm a big fan of RavenDb -- it s a .NET document database that is designed by some of the same guys who brought you nHibernate. Also has some pretty good sql integration so you can dump stuff to sql server if you've got, say, lots of reporting sitting there.

There are a number of other options in the wild as well.

As Milotic said, this is a legacy app with tons of handcrafted SQL and DBs growing upwards of 6Gb. As much as I like RavenDB, db4o and similar products, it would make no sense to do that here.

PetaPoco however does provide a nice alternative way to gradually transition from old to new (although it's no full ORM I can see that working without loosing too much productivity) The input has been of value so far and I guess I'll be toying with some ORM stuff in the near future.

epswing
Nov 4, 2003

Soiled Meat
If I have an ObservableCollection<T>, which notifies observers when the collection is changed (added to, removed from, etc), what's the best strategy for notifying those same observers when an element (which implements INotifyPropertyChanged itself) in that ObservableCollection<T> changes?

I could use BindingList<T>, but then again I can't, because it doesn't provide the necessary sorting facilities that ObservableCollection<T> does.

ether
May 20, 2001

epswing posted:

If I have an ObservableCollection<T>, which notifies observers when the collection is changed (added to, removed from, etc), what's the best strategy for notifying those same observers when an element (which implements INotifyPropertyChanged itself) in that ObservableCollection<T> changes?

I could use BindingList<T>, but then again I can't, because it doesn't provide the necessary sorting facilities that ObservableCollection<T> does.

Something like this?

code:
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Collections.Specialized;

  public class MyCollection<T>: ObservableCollection<T> where T : INotifyPropertyChanged
  {
    protected override void InsertItem(int index, T item)
    {
      base.InsertItem(index, item);
      item.PropertyChanged += (s, e) =>
      {
        this.OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, (T)s));
      };
    }
  }

epswing
Nov 4, 2003

Soiled Meat

ether posted:

Something like this?

I was thinking of something along those lines, but wouldn't I have to do that += for InsertItem, SetItem, Add and Insert?

And then what about Remove, RemoveAt, RemoveItem, Clear and ClearItems? Would I have to write the equivalent -= lambdas?

epswing
Nov 4, 2003

Soiled Meat
Also, quick WPF question, I'm not sure what to google for here...

If I click an item in a stock ListBox its background turns blue. If I then click somewhere else, its background turns grey (as in, "I'm selected but I'm not in focus"). What's that grey state called, and how can I change it to another colour?

ether
May 20, 2001

epswing posted:

I was thinking of something along those lines, but wouldn't I have to do that += for InsertItem, SetItem, Add and Insert?

And then what about Remove, RemoveAt, RemoveItem, Clear and ClearItems? Would I have to write the equivalent -= lambdas?

That's the downside to lambda's, no -= equivalent and hope garbage collection cleans up the mess. The example will get cleaned just right, but if you put more in there you might open yourself up to keeping the lambda alive way beyond it's scope. SetItem however needs to be taken care of similarly but all the removal overloads are taken case of by GC.

You could also make a Dictionary<T,PropertyChangedEventHandler> to store them and use item as a key and check against that dictionary. I'ld go with the simpler solution though, due to readability and simplicity.

edit: as far WPF's ListBox, an answer emerges

ether fucked around with this message at 15:06 on Jul 5, 2011

dwazegek
Feb 11, 2005

WE CAN USE THIS :byodood:

ether posted:

SetItem however needs to be taken care of similarly but all the removal overloads are taken case of by GC.

You can't depend on the GC in this situation, because you can't guarantee that a removed item will be collected. If an item is removed from the collection, but still stays alive, it will continue to raise events, and the collection will continue to pass those on.

edit:
The Dictionary<T, PropertyCHangedEventHandler> is a better idea, but you can't guarantee that the the items are suited for use as dictionary keys.

You could keep a List<PropertyChangedEventHandler>, and make sure you insert and remove the items in that list so that their indexes correspond with the indexes of the items in the ObservableCollection.

dwazegek fucked around with this message at 15:32 on Jul 5, 2011

biznatchio
Mar 31, 2001


Buglord

PDP-1 posted:

As far as I know you can't (and shouldn't) mess with the priority of the ThreadPool threads, is there any other way to tell them to chill out a bit and let the main thread have a bit more CPU time?

You can implement your own TaskScheduler that sets up threads with a lower OS scheduling priority. That way you'll ensure that your UI thread always has priority and won't get choppy because it has to wait for background tasks to yield CPU.

dwazegek
Feb 11, 2005

WE CAN USE THIS :byodood:

dwazegek posted:

edit:
The Dictionary<T, PropertyCHangedEventHandler> is a better idea, but you can't guarantee that the the items are suited for use as dictionary keys.

You could keep a List<PropertyChangedEventHandler>, and make sure you insert and remove the items in that list so that their indexes correspond with the indexes of the items in the ObservableCollection.

Ugh, completely overthinking the problem.

code:
protected override void InsertItem(int index, T item)
{
  base.InsertItem(index, item);
  AddHandler(item);
}

protected override void SetItem(int index, T item)
{
  T prev = Items[index];
  base.SetItem(index, item);
  RemoveHandler(prev);
  AddHandler(item);
}

protected override void RemoveItem(int index)
{
  T prev = Items[index];
  base.RemoveAt(index);
  RemoveHandler(prev);
}

private void AddHandler(T item)
{
  if (item != null)
    item.PropertyChanged += item_PropertyChanged;
}

private void RemoveHandler(T item)
{
  if (item != null)
    item.PropertyChanged -= item_PropertyChanged;
}

private void item_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
  OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, sender));
}
The public Add/Remove/RemoveAt/etc methods all end up calling one of the protected functions, so you don't have to override any of them (if they can even be overridden).

edit:
Forgot to add, you'll have to override ClearItems and remove all the handlers there as well.

dwazegek fucked around with this message at 17:22 on Jul 5, 2011

Sedro
Dec 31, 2008
Are you certain that you need to do this? A CollectionChanged event is much more work for the UI to handle than a PropertyChanged event.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?
OK what the gently caress am I doing wrong here? I'm trying to implement single signon using Forms authentication. Every app is within one domain

The "authenticating" app:
code:
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
	username,
	DateTime.UtcNow,
	DateTime.UtcNow.AddHours(2),
	false,
	userID.ToString(),
	FormsAuthentication.FormsCookiePath
);

string cookieText = FormsAuthentication.Encrypt(ticket);
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName,cookieText);
cookie.HttpOnly = true;
cookie.Domain = "localhost"; //This will be changed
cookie.Expires = DateTime.UtcNow.AddHours(2);

Response.Cookies.Add(cookie);
Yet when I go to the app which checks the auth cookie, it cannot find it and it still says not authenticated. I've set the machineKey parameters EXACTLY the same across both applications. I'm perplexed :/

I'm open to other means of single sign-on, by the way.

epswing
Nov 4, 2003

Soiled Meat
Peep this y'all

code:

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:WpfApplication1"
        Title="MainWindow" Height="350" Width="525">
    
    <Window.Resources>
        <local:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"
                                            True="Visible"
                                            False="Collapsed" />
    </Window.Resources>
    
    <Canvas>
        <StackPanel Canvas.Left="100" Canvas.Top="100" Width="200" Height="100">
            <ListBox>
                <ListBoxItem>one</ListBoxItem>
                <ListBoxItem>two</ListBoxItem>
                <ListBoxItem>three</ListBoxItem>
            </ListBox>
            <StackPanel Orientation="Horizontal"
                        Visibility="{Binding
                                     RelativeSource={RelativeSource AncestorType={x:Type StackPanel}},
                                     Path=IsMouseOver,
                                     Converter={StaticResource BooleanToVisibilityConverter}}">
                <Button>one</Button>
                <Button>two</Button>
                <Button>three</Button>
            </StackPanel>
        </StackPanel>
    </Canvas>
</Window>

public abstract class BooleanConverter<T> : IValueConverter
{
    public BooleanConverter(T trueValue, T falseValue)
    {
        True = trueValue;
        False = falseValue;
    }

    public T True { get; set; }
    public T False { get; set; }

    public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        return value is bool && ((bool)value) ? True : False;
    }

    public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        return value is T && EqualityComparer<T>.Default.Equals((T)value, True);
    }
}

public class BooleanToVisibilityConverter : BooleanConverter<Visibility>
{
    public BooleanToVisibilityConverter()
        : base(Visibility.Visible, Visibility.Collapsed)
    { }
}


When I hover over the outer StackPanel, the inner one becomes visible! Amazing! Except if I move the mouse below the ListBox on the right side near the rightmost arrow, the inner StackPanel and my buttons vanish, meaning IsMouseOver becomes false. How's that?? The outer StackPanel should be taller when IsMouseOver is true, right?

Also if I move my mouse in the teenie space inbetween the buttons, the inner StackPanel also disappears.

If I move my mouse straight down from the ListBox onto one of the buttons, it works as expected.

What am I doing wrong?

Here's the project if you want to play with it: http://dl.dropbox.com/u/4220513/WpfApplication1.zip

No Pants
Dec 10, 2000

The mouse-over event isn't being generated because Windows is strange. If you set the Background property on the outer StackPanel to Transparent, you'll get what you want.

epswing
Nov 4, 2003

Soiled Meat
:wtc: :ughh:

epswing fucked around with this message at 21:31 on Jul 6, 2011

Sedro
Dec 31, 2008
By default, a control's background is null. Try setting it to transparent:
code:
<StackPanel Background="Transparent"/>
Edit: beaten

PhonyMcRingRing
Jun 6, 2002

No Pants posted:

The mouse-over event isn't being generated because Windows is strange. If you set the Background property on the outer StackPanel to Transparent, you'll get what you want.

It's not really all that strange. In WPF, if you set the background to Transparent then the control will still be hit testable. If you set it to null, it won't be hit testable at all.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Looking through the table of culture names for the CultureInfo class I see that for all of the xx-XX entries there is one that is two letters - except for China. They have zh-CN, zh-HK, etc, but no zh. Is there a particular reason for that?

Sedro
Dec 31, 2008
From your link:

quote:

A neutral culture is a culture that is associated with a language but not with a country/region. A specific culture is a culture that is associated with a language and a country/region. For example, "fr" is a neutral culture and "fr-FR" is a specific culture. Note that "zh-CHS" (Simplified Chinese) and "zh-CHT" (Traditional Chinese) are neutral cultures.

ether
May 20, 2001

PhonyMcRingRing posted:

It's not really all that strange. In WPF, if you set the background to Transparent then the control will still be hit testable. If you set it to null, it won't be hit testable at all.

It is not very great design-wise though, considering almost everyone makes that same mistake when they first mess around with mouse-captures.

PhonyMcRingRing
Jun 6, 2002

ether posted:

It is not very great design-wise though, considering almost everyone makes that same mistake when they first mess around with mouse-captures.

*shrug* I'd rather be able to just set a background color to null instead of having to setup a bunch of regions and indicate what's hit testable and what isn't. It's a mistake you make once and then never forget.

Sedro
Dec 31, 2008
UIElement.IsHitTestVisible should be used for that. The background shouldn't have anything to do with hit testing.

Mustache Ride
Sep 11, 2001



I've got a strange problem I need some help with.

For some reason I've been asked to interview ~20 or so Indians in our India office next week, and determine which are the best candidates to hire on a .net/c# position. The problem is that the last programming language I touched was C back in the early 90s, and I really don't know anything about .net.

Could you goons help me figure out 3 or 4 questions (along with the answers for the .net impaired) I can ask these Indians to see whether they really do know .net, or just shoved it on their CV to get hired?

thebruce
Jul 4, 2004

Mustache Ride posted:

I've got a strange problem I need some help with.

For some reason I've been asked to interview ~20 or so Indians in our India office next week, and determine which are the best candidates to hire on a .net/c# position. The problem is that the last programming language I touched was C back in the early 90s, and I really don't know anything about .net.

Could you goons help me figure out 3 or 4 questions (along with the answers for the .net impaired) I can ask these Indians to see whether they really do know .net, or just shoved it on their CV to get hired?

Perhaps some kind of practical test would be better since you wouldn't know if they were bullshitting you or not?

Take a laptop with visual studio express on it and get them to do 'fizzbuzz' from scratch with no Internet access - this would let you know that they can create a simple project. It also has a defined output that you can verify. If they do this easily then they can follow simple instructions and create simple algorithms.

This would at least weed out the guys who put .net on their CV and have never used it.

Perhaps there should be other tests too. Maybe more than would be achievable so that you could distinguish two great candidates if necessary. Make them do the work, and if necessary get someone with .net experience to review the code afterwards.

Wells
Sep 21, 2008

THIS IS A BIZ!!!
Lipstick Apathy
So I just finished work on a small app that uses DataContracts. I'm trying to release it as a partial trust application, and surprise*! It doesn't want to serialize my classes that have private members under partial trust. I'd rather not just give up and require more trust if possible, but it seems really counter-intuitive to have to make members that should be private by design public just so they can be serialized.

Is there a happy medium between punching my design in the face and requiring medium/full trust wherein I can still serialize my classes with DataContracts?

*this was not a surprise, it clearly said this in the documentation I didn't read until it became a problem.

Sulla Faex
May 14, 2010

No man ever did me so much good, or enemy so much harm, but I repaid him with ENDLESS SHITPOSTING
I'm a complete beginner, does anybody know any good resources for Visual C#? I have a couple books but they're not visual, I'm looking for something online that I can refer to quickly to see how form windows should be called and manipulated etc. The msdn library of tutorials doesn't actually appear to have any tutorials, just a list of.. tutorials they'd like to have?

Nurbs
Aug 31, 2001

Three fries short of a happy meal...Whacko!

Wells posted:

So I just finished work on a small app that uses DataContracts. I'm trying to release it as a partial trust application, and surprise*! It doesn't want to serialize my classes that have private members under partial trust. I'd rather not just give up and require more trust if possible, but it seems really counter-intuitive to have to make members that should be private by design public just so they can be serialized.

Is there a happy medium between punching my design in the face and requiring medium/full trust wherein I can still serialize my classes with DataContracts?

*this was not a surprise, it clearly said this in the documentation I didn't read until it became a problem.

Will setting the private fields with the [IgnoreDataMember] attribute work?

Adbot
ADBOT LOVES YOU

PhonyMcRingRing
Jun 6, 2002

Sedro posted:

UIElement.IsHitTestVisible should be used for that. The background shouldn't have anything to do with hit testing.

err, I didn't mean hit testing, my bad. I meant clicking the transparent area, my brain said I hit things with the mouse.

  • Locked thread