Search Results

Search found 2 results on 1 pages for 'gregsdennis'.

Page 1/1 | 1 

  • Best approach for utility class library using Visual Studio

    - by gregsdennis
    I have a collection of classes that I commonly (but not always) use when developing WPF applications. The trouble I have is that if I want to use only a subset of the classes, I have three options: Distribute the entire DLL. While this approach makes code maintenance easier, it does require distributing a large DLL for minimal code functionality. Copy the classes I need to the current application. This approach solves the problem of not distributing unused code, but completely eliminates code maintenance. Maintain each class/feature in a separate project. This solves both problems from above, but then I have dramatically increased the number of files that need to be distributed, and it bloats my VS solution with tiny projects. Ideally, I'd like a combination of 1 & 3: A single project that contains all of my utility classes but builds to a DLL containing only the classes that are used in the current application. Are there any other common approaches that I haven't considered? Is there any way to do what I want? Thank you.

    Read the article

  • WPF Single Selection Across Multiple ItemsControls

    - by gregsdennis
    Part of my app has a month-view calendar interface, but I'm having trouble with item selection. The interface is set up so that each of the days in the view contains a ListBox of items, much like the month view in Outlook. The problem I'm experiencing is that I need to maintain a single item selection across all of the ListBoxes. Below is a sample window that should adequately describe my situation. I need to maintain a single selection between both ListBoxes. <Window x:Class="StackOverflow.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <ListBox ItemsSource="{Binding Numbers}" SelectedItem="{Binding SelectedObject"/> <ListBox Grid.Column="1" ItemsSource="{Binding Dates}" SelectedItem="{Binding SelectedObject"/> </Grid> </Window> In this primitive example, I would expect that when the SelectedObject property of my view model gets set to an item that's not in one ListBox, the selection would be removed in that ListBox, but that doesn't happen. I understand that I can simply name each ListBox, and hook into the SelectionChanged event. I'd prefer to not have to do that with an entire month-view calendar. There has to be a better way. In a previous iteration of the app, I was able to create a SelectionManager static class with an attached property that was used to maintain selection. However, I can't use this now as the classes I'm using for my items are not DependencyObjects, and I'd really prefer not to have to create DependencyObject wrapper classes as this will considerably complicate my architecture. Thanks.

    Read the article

1