Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

James J Foster

@James J Foster
About
Posts
10
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Binding a ComboBox's ItemSource when in an ItemsControl DataTemplate - best way?
    J James J Foster

    I wanted to minimize my dependencies to within the ItemsControl, and not assume a particular relationship between objects in my ViewModel (the data context). Here's at least one solution that works:

    ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}, Path=DataContext.Stores}"

    WCF and WF css wpf wcf question

  • Binding a ComboBox's ItemSource when in an ItemsControl DataTemplate - best way?
    J James J Foster

    I have an ItemsControl bound to a collection within my view model, and a data template to display a data-entry form. Any suggestions on how I should bind the combobox to a property on the original data context? Because the ComboBox is part of the DataTemplate in an ItemTemplate, the context is set to the current item. Code Excerpt: <ItemsControl ItemsSource="{Binding Source=WorkingCopy.CalendarBasedAttributes.Attributes}"> <ItemsControl.ItemTemplate> <DataTemplate> <Grid Margin="5 20 0 0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="100" /> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition/> </Grid.RowDefinitions> <Label Content="{Binding CalendarTimePeriod}" Grid.Column="0" Grid.Row="0"/> <ComboBox ItemsSource="{Binding WHATGOESHERE?}" Grid.Column="1" Grid.Row="0" /> </Grid> </DataTemplate> </ItemsControl.ItemTemplate>

    WCF and WF css wpf wcf question

  • ComboBox's SelectedValue set to null when changing templates
    J James J Foster

    I am using the MVVM pattern, and have a multi-screen data entry form. There is a single VM with an ActiveScreen property that uses INotifyPropertyChanged events. Templates are used by the View based on the current ActiveScreen. On one of the screens, I have a ComboBox that is bound to a List<> for its ItemsSource. I am using the MVVM pattern, and the selected value of the Combobox is twoway bound to a property on my model. All works fine when you are on the screen entering data. When the user changes the ActiveScreen, and hence a new template is used in the View, a weird thing happens. The property on the model bound to the combobox is set to NULL. Looking at the call stack, I see the ActiveScreen property change event, then a bunch of WPF code, and then my property setter. The count in the collection on the combobox at that point is 0. It seems as if WPF does some cleanup of the combobox by removing all the items, which sets the selecteditem to null, and because of my binding, it changes my model. The net effect is I lose the data entered by the user. The other elements on that screen (textboxes, datepickers, etc) do not have this problem, so it's clearly something with the ComboBox. Has anyone hit this before, and know of a solution? The problem is, I want the user to be able to select a blank value, so I don't know if it's the user setting the value to null or this odd series of events.

    WPF wpf csharp wcf data-structures regex

  • WPF XAML vs Procedural Code
    J James J Foster

    There are many advantages of XAML, but disadvantages as well as you pointed out. In the case of WPF, XAML is a non-language specific description of the UI using a more natural hierarchical relationship between elements. This also enables easier code sharing between languages, and enables tools to generate XAML without knowing the nuances of a programming language. Expression blend is one such tool, and there are converters for many other third party tools as well, such as Adobe Illustrator. You can write a feature-rich app with just XAML and never touch a line of VB.NET or C#. That being said, there are advantages to both XAML and procedural code and those trade-off decisions need to be addressed in your design. I personally like to see the hierarchical relationship, but do have some gripes when it comes to debugging complex XAML.

    WPF csharp visual-studio wpf html graphics

  • .net 1.1 client for WCF web service
    J James J Foster

    We encountered the same problem. The short answer is that you need to either switch to, or also expose, a basicHttpBinding. Clients in .NET 1.1 (ie. non-WCF) cannot communicate with a wsHttpBinding.

    WCF and WF csharp wcf help question

  • Unable to connect to Web Service
    J James J Foster

    You are getting a general communication error, so it could be any number of things. Go through the basic diagnostics first: can you ping the web service server from where your code is running? Try also to load the web service URL in your browser, if it's http based.

    C# help

  • Newbie trying to get a grasp
    J James J Foster

    I would suggest two things. One is to stick with basic WinForms or Console applications, and focus on one small thing at a time, such as reading/writing a file, using collection classes, creating and using a class library, etc. until you are very comfortable with C#, the IDE, and these three project types: WinForms, Console, Class Library. The second thing I would suggest is NOT messing with the registry just yet while you are learning. The registry is vital to Windows and should your program logic be off, your entire system may become unbootable. When you focus on tdeveloping your building blocks, you'll start to naturally see how to combine them to create the solution you want.

    Windows Forms csharp tutorial dotnet windows-admin question

  • Salary History
    J James J Foster

    It's a negotiating tactic, whether for fulltime or contract work, designed to answer a couple questions. One is whether or not your salary falls into their range. If historically you've made 80k, and they are offering up to 70k, they likely won't consider you even further. Second, is whether you have a history of being "worth" your salary requirements. It's hard to justify asking for 120k if historically you've never made above 70k. Any company is going to try and get you for the least amount possible, and protect themselves from hiring someone for way more than they are worth, and that's usually done by offering just above what you've been making historically. The best advice I can give is to get to the heart of what they want to know, and always work in ranges, never exact amounts. A good technique is to talk about "total compensation" or the "complete package", which shifts the conversation away from particulars of salary and considers the larger picture of salary, bonus, options, vacation, etc.

    The Lounge question career help

  • picking subject from mail
    J James J Foster

    So, if I understand it correctly, you want to programmatically trigger a "reply" action in the user's email client. Is this for an intranet scenario, where you can limit the number of email clients supported, or are you looking for this functionality regardless of what email client a user has?

    ASP.NET html help

  • Virtual PC
    J James J Foster

    Using virtual machines is the safest thing for your host operating system. What happens is that Virtual PC creates a normal file on your hard drive and this functions as the "hard disk" of the virtual machine. It's called a virtual hard disk (VHD). The guest operating system cannot touch any part of your host machine (unless you let it). VHD files are BIG, because you'll usually want at least a couple of GB in your virtual machine. As others have posted, you just start Virtual PC and it boots from this virtual hard disk. You put a CD in your physical drive, and then go through the installation program to install an OS. I'd suggest reading this article: http://www.windowsecurity.com/articles/Microsoft-Virtual-PC.html Another option is to download a pre-configured virtual machine. Then you just use Virtual PC to open it. It's a good way to get used to opening up and using virtual machines without the investment of installing a complete operating system. Microsoft has several you can download, which I've linked below: VHD Search Results on MSDN

    The Lounge question linux tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups