wpf

WPF/Winform Time Range Selector

Hello, I'm looking for a decent WPF or Winform time range selector, much like a home central heating system, where a time range is selectable. http://lhill.com.au/l%20hill%20web%20page%20pictures/time%20clock%202.jpg Is there any GUI libraries or examples available to fulfill this need? ...

WPF Button with Image

I'm trying to attach an image on a button in WPF, however this code fails. Seems strange after similar code would work perfectly in Mozilla XUL. Disconnect from Server ...

WPF DataGrid binding to UserControl

I have a DataGrid with one column using a UserControl via a styled DataGridTemplateColumn. I can't seem to get the UserControl to 'see' the object that is in it's containing DataGridCell though. What kind of bindings can I create on the TextBox in my UserControl so that it can look up and see that object?! My UserControl and TemplateCol...

How can i initialise a server on startup?

Hey all, I need to make some connections on startup of a server. I'm using the wcf technology for this client-server application. The problem is that the constructor of the server isn't called at any time, so for the moment, i initialize the connections when the first client makes a connection. But this generates problems in a further p...

Problem with align button in treeview in wpf

Hi, I've got something: <HierarchicalDataTemplate DataType="{x:Type MyService:Country}" ItemsSource="{Binding Path=ListOfAreas}"> <StackPanel Orientation="Horizontal"> <TextBlock TextAlignment="Center" Text="{Binding Path=Name}"/> <Button Name="My...

Why companies still using winforms /wpf application instead web application?

I don't want discussion. I want only reasons, because I last days have lack of confidence in my job(winforms/wpf) and I thinking it is good way to change technology/job. Thanks for answers ...

Firing PropertyChanged event in a complex, nested type in WPF

I have a class called DataStore and a list of Departments (an ObservableCollection), and each department again has a list of Products. Properties in the Product class that are changed also affect properties in the Department and DataStore class. How does each Product notify the Department it belongs to, and the DataStore (which is the mo...

WPF - How do I expose namespaces throughout a project

Sorry... I hope this isnt a really dumb question... but I couldnt find the answer anywhere. I have a WPF application, in each of my usercontrols / windows I am currently putting the following code in xaml in the header... xmlns:properties="clr-namespace:MaxCut2.Properties" This particular properties namespace I use in every window / u...

Get logical path from treeview which has HierarchicalDataTemplate

Hi, I have a structure of geography objects: Country Areas, Provinces, Cities and Hotels Country has areas, areas has provinces, provinces has cities, and cities has hotels. Whne I'll click City node I wanna to get logical path eg: France,Provanse,SomeProvince,Montpellier,Grand Hotel. Each class has fields: name, code nad listOf......

WPF bind to a static double var

hi, i have these double values: public partial class Window1 : Window { public Window1() { InitializeComponent(); double num1 = 50.0; double num2 = 90.0; double num3 = 120.0; double num4 = 20.0; double num5 = 80.0; } } how do i bi...

C# generics with MVVM, pulling the T out of <T>

My Model is a generic class that contains a (for example) Value property which can be int, float, string, bool, etc. So naturally this class is represented something like Model<T>. For the sake of collections Model<T> implements the interface IModel, although IModel is itself empty of any content. My ViewModel contains and instance of M...

WPF: Improving Performance for Running on Older PCs

So, I'm building a WPF app and did a test deployment today, and found that it performed pretty poorly. I was surprised, as we are really not doing much in the way of visual effects or animations. I deployed on two machines: the fastest and the slowest that will need to run the application (the slowest PC has an Intel Celeron 1.80GHz wi...

WPF Visual Studio Designer and Expression Blend are not respecting TypeConverter on DependencyProperty

I have added the dependency property MyList to a wpf textbox. The dependency property is of type List<string>. In order to make things easier in xaml I have defined a converter so that I can have following syntax: <Grid> <controls:MyTextBox x:Name="Hello" MyList="One,Two" Text="Hello" /> </Grid> In Visual Studio I can't edit the...

IntelliSense and Folding Editor Not Working in Visual Studio 2008 SP1 for Certain Files Only

Ok, I have an issue that is driving me nuts. In certain xaml files only, neither IntelliSense nor the folding editor is working. I have noticed that if I delete the local namespace and add it back, the folding editor starts working. If I delete the local namespace and don't add it back, IntelliSense starts working as well. Of course, I...

WPF/C#: Proper implementation for closing/hiding the form while new form is opening

Hi, I was looking something similar with winforms like // in Form 1 this.Hide(); Form2 form = new Form2(); form.Show // in Form 2 // if button pressed, Form 1 will be displayed, while Form 2 will be Hide. I was trying my luck for FormEventHandler but doesn't know where to start. Any suggestions/ideas? ...

What's the best way to handle layout issues with multi-language support in WPF/XAML?

I'm creating a standalone WPF app with multi-language support. I've found some great resources (mostly on SO) on how to store and access the strings as needed. This part is pretty straightforward and doable, but I'm fuzzy on how to take care of screen layout issues. I'm using some custom images to skin up my app for buttons, etc. For in...

WPF Custom ListBox as Buttons Click not firing

I am attempting to have a ListBox of TextBoxes with click events. I have read that one way to achieve this was to have a list of Buttons and call ButtonBase.Click="" on the ListBox. This was not working. Any advice as to how I would hook up a click event to the listbox items? I was also trying to change the style if the button was ...

WPF: Filter TreeView without collapsing it's nodes

This one is a follow-up question. I filter the top level nodes of a TreeView control like shown below. private void ApplyFilterHandler(object sender, RoutedEventArgs e) { if (_filterCheckBox.IsChecked.Value) CollectionViewSource.GetDefaultView(TopLevelNodes).Filter += MyFilter; else CollectionViewSource.GetDefau...

How do stop output buffering in a WPF TextBox?

I don't want text to be buffered from my application to a WPF TextBox. I can't see an obvious property for it. Currently, I'm just using the AppendText method. In C we used something like setbuf(stdout, (char *)NULL) - is it something like that in C# or something simpler? ...

Component Application Block for .NET 2.0 (WinForms) - What are the new versions?

What are the new versions of CAB, mainly for WPF? What is changed? Is it the same stuff, adjusted for WPF characteristics? Does it still rely on Unity (and SCSF for the matter)? I find Microsoft and MSDN to be very confusing sometimes ... :( ...