wpf

DispatcherTimer vs a regular Timer in WPF app for a task scheduler

Please, explain the difference between "DispatcherTimer" and "a regular Timer" that @Kent Boogaart meant for using in a multithreading WPF app as a task sheduler in this topic: http://stackoverflow.com/questions/1341829/advice-needed-for-multi-threading-strategy-for-wpf-application in the commentaries to one of the post (quote): -If a...

Animate selected item of wpf listbox

Hi all, I'm trying to set a global style for all the listboxes in my application. Below is the xaml code that i've used. Here i've tried to trigger out an animation but it doesn't work. I just want an animation on the selected item. Any help? <Style TargetType="{x:Type ListView}"> <Style.Setters> <Setter Property="BorderThic...

How to make list item horizontally stretched ?

Here is a window with a simple list: The code is straight-forward: <Window x:Class="Wpf_List.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" Title="MainWindow" Height=...

Do unused xaml styles increase the size of xap file?

If i include a bunch of styles that i don't use any more into my project will that increase the size of the final XAP file? ...

How to get a static reference to a WPF Window?

I've tried a huge amount of ways to get a static reference of my window across my program. I need to access all of its members at runtime from different classes, so a static reference is needed. What I'd like to have is something like Program.Window1, where Core is static and MyWindow is one of its static members. In WinForms, I usuall...

WPF: How can I change the way InkCanvas draws?

I've searched for examples for this, but the ones I've ran across seem to focus on simpler stuff like setting the InkCanvas DefaultDrawingAttributes such as Width, Height, Color etc. Doesn't seem like there's a lot of material for this. For example, if I hold down the mouse button I can see it drawing lines. What if I want to draw ellip...

What would you suggest for building such a control in WPF?

I need to build a WPF control that looks somehow similar to this: Where each color should be clickable and resizable (or selectable). This control will be used to set modes on the hours of a day. I've thought about making 24 buttons that would be arranged in a circle: Another idea was to draw a complete circle and calculate user mo...

Binding and appendText result to a textbox .Total Beginner in WPF.Need help

Total beginner in WPF so bear with me. I building a proof of concept application before with go ahead with it.I have decided to give it a go a WPF. This is the scenario: I have: a View=CustomerView (userControl with a button "Buy Products") a txtbox (append all the actions that occurs) ViewModel=CustomerViewModel...

Why does WPF Style to show validation errors in ToolTip work for a TextBox but fails for a ComboBox?

I am using a typical Style to display validation errors as a tooltip from IErrorDataInfo for a textbox as shown below and it works fine. <Style TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{B...

Is there something like Snoop (WPF) or FireBug (ASP.NET) for Windows Forms?

I want to point with the mouse on an area in my application and know the name of the UserControl. ...

MVVM Multiple Command Handlers

My Application layer uses DialogPresenters to show some ViewModels in various dialogs (modal, splash screen, etc..). public DataImportDialogPresenter(DataImportViewModel viewModel, IDialogView shellView, IDialogView owner) : base(viewModel, shellView, owner) { //Base sets the view data context etc. //Moni...

How does the ClickOnce installer handle updates when a compact database is involved?

Hi, I have a simple WPF application that uses ClickOnce to handle installing. Within this application is a compact database. Through testing I have found that when I publish a new build this database will get overwritten, which is not what I want. Is there anyway I can have fine grained control over what files are updated? I assume Clic...

.NET WPF UI Component Library

Which library to use for WPF? Infragistics ComponentOne SyncFusions ActiProSoftware Telerik Thanks, Marco Parenzan ...

WPF UI Suggestions?

I have a UI with some controls, then in the middle I have 6 overlapping grids. I am using these grids as 'pages' and as the user navigates through the 'pages' I cycle through using Visible.Hidden and Visible.Visible to show the correct 'page'. I noticed while developing as I was adding more grids the application started to slow down (a...

What do you do about ModelView files growing massive in a MVVM application?

I am writing a MVVM application and one of the screens is quite significant in size. The screen maintains and object that has multiple lists of other objects that also get editied within the context of the transaction. I've broken the views up into multiple user controls. The model is broken up into the different class types. The proble...

Why my WPF binding not work?

I trying to bind List to Listbox. And at the Button1Click method new instance of MyClass adds in my List<>, but that not visible in my listbox. There my code: public static class NotesEngine { public static List<Note> All; static NotesEngine() { All ...

how to use fucntion in one xaml.cs in another xaml.cs

Hi, Im wpf application,i have preset.xaml.cs,in that one function is there like adding text to listbox. But i want to do that function in toolbar.xaml.cs. How can i refer controls in preset.xaml in toolbar.xaml.cs. presetbox is listbox used in preset.xaml I want to add text for that box from toolbar.xaml.cs. Pls help me.Im new to C#. ...

How can I make a user control extend a class that extends UserControl?

I want to attempt an MVC design for my little app. I have a normal Csharp class ViewBase which extends UserControl. It's a single .cs file. I have multiple classes that I want to extend ViewBase. These are actual UserControls so they have a code behind .cs file and a .xaml file. However, CSharp tells me that for these classes, their b...

WPF CustomControl Commands and databinding

Well i have a custom control called Dialog to slim it down to the problem Here is my vb.net code: Public Class Dialog Inherits System.Windows.Controls.Control #Region "DependencyProperties" Public Shared ReadOnly OkCommandProperty As DependencyProperty = _ DependencyProperty.Register("OkCommand", _ ...

WPF share column width between separate grids

I have the following setup on my WPF UserControl: <GroupBox> <Grid> ... <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <GroupBox> <Grid> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="..." /> I'd like the second ColumnDefinition to be the same width as the first...