wpf

How to set up Header/Lines in WPF/Silverlight

Hi, Do you have any best practices for setting up Header/Lines forms (Also known as Header/Details) in WPF or Silverlight? Preferably using the Mode-View-ViewModel design Pattern to fit in with the rest of my application. An example would be if I had a grid that displayed all SalesOrders in the database, and the underneath that a grid ...

How do you select the right size icon from a multi-resolution .ico file in WPF?

If I have a multi-resolution icon file (.ico), how can I insure that WPF picks the right sized one? Does setting the width and height of the Image force it, or does WPF simply resize the first icon in the ico file? This is what I'm using currently (it works, but I'd like to avoid the resizing if that's what's happening). <MenuItem.Icon...

Help saving a visual to file with PixelShader effect - WPF.

Hello, I'm trying to save a wpf control to file, but I'm applying a PixelShader effect to it, and when I try to save, the saved image is entirely white, black or red... deppends on the parameters of the effect. I'm using the code here: http://stackoverflow.com/questions/59958/wpf-programmatic-binding-on-a-bitmapeffect how can I proper...

When writing the xaml for my user controls should I remove grid and use dock panel or something else?

I am adding user controls in my solution. The main page of my project will have a dock panel. When writing the xaml for my user controls should I remove grid and use dock panel or what? Iam using visual studio express and WPF. ...

DllNotFoundException -- VisStudio 2008, C#

This just started happening with an application that has been working: "A first chance exception of type 'System.DllNotFoundException' occurred in PresentationCore.dll A first chance exception of type '.ModuleLoadException' occurred in PresentationCore.dll A first chance exception of type 'System.TypeInitializationException' occurred in...

Most performant way to graph thousands of data points with WPF?

I have written a chart that displays financial data. Performance was good while I was drawing less than 10.000 points displayed as a connected line using PathGeometry together with PathFigure and LineSegments. But now I need to display up to 100.000 points at the same time (without scrolling) and it's already very slow with 50.000 points...

TabControl without border wpf (XP)

Hi! I'm experiencing a visual issue with styling a TabControl in WPF. So even if I set the border of the tab control to be 0px and transparent there is still a very thin line on the right and bottom borders. I didn't manage to find the property which would resolve that, so maybe someone experienced the same issue and could share it. ...

Change the ToolTip InitialShowDelay Property Globally

I have an application that has upwards of a hundred different ToolTips set on a Ribbon control. All of the ToolTips pop up rather quickly (about half a second), and I would like to increase the pop up delay. After some research it appears the only way to do this in WPF is through the ToolTipService.InitialShowDelay property. My question...

Customise WPF "Slider" control to slide on a path

What would be the best way to get a slider control that slides on a path. At the moment I think the path I will use is a half circle arc. But I may need to change this later (or create other sliders with different paths. So I need to take that into account. Would it be best to start with the default Slider control and modify/extend it? ...

WPF Table?

I'm very new to WPF, so I've just started making a very simple Memory card game just to learn the syntax and such. The game is where all the cards are facing down, you flip two over and if they match you remove them, otherwise reflip them down and try to remove all the cards in the shortest number of flips. Like I said, very simple... ...

WPF ControlTemplate Style GradientStop in Trigger

Here is my XAML for a TabItem. I want to be able to set the Color of a single gradient stop in a trigger. I know that I can re-define the gradient completely in the trigger's setter, but I want to access a specific property on the background so I can animate it in the future. I have tried every variation of everything in the trigger's s...

Why can visual studio not find my WPF InitializeComponent method?

This is very strange. I have a XAML file that looks as follows... <Window x:Name="window" x:Class="ix.Production.Title" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Title" Height="768" Width="1024" Loaded="window_Loaded"> <W...

WPF Multiple Values for Property

I would like to apply a style, to a ProgressBar, for when it between certain values the style should change. <Style x:Key="ProBar" TargetType="{x:Type ProgressBar}"> <Style.Triggers> <Trigger Property="Value" Value="<10"> <Setter Property="Foreground"> <Setter.Value> <!--OrangeColou...

How to get a WPF window's ClientSize?

In WinForms, Form had a ClientSize property (inherited from Control), which returns the size of its client area, i.e., the area inside the title bar and window borders. I'm not seeing anything similar in WPF: there's no ClientSize, ClientWidth, ClientHeight, GetClientSize(), or anything else that I can think to guess the name of. How d...

WPF SystemColors: color of TextBox border

I am trying to make a search TextBox with an embedded magnifying glass icon. I have the following markup so far: <Border DockPanel.Dock="Bottom" Margin="2,4,0,4" BorderThickness="1" SnapsToDevicePixels="True" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"> <DockPanel> <Sta...

After changing namespace in UserControl files, ...g.cs files get errors

I copied three classes in from another WPF project and then changed their namespaces. Now when I run the project, I get errors in the ".g.cs" files which say that the namespace is incorrect. I change this namespace but when I compile and run again, the ".g.cs" files get regenerated and overwritten with the old namespace version and I ge...

Channging Template

Hi All, I have a togglebutton on which I want to use two different template on Checked and Unchecked State. When the ToggleButton is Clicked (IsChecked=True) I want to Use template 1 and when it is clicked for the second time I want to use Template 2. That's it !!! How can I do that ?? Should I use Event Trigger or Trigger for that...

WPF - OnPropertyChanged for a property within a collection

In a view model, I have a collection of items of type "ClassA" called "MyCollection". ClassA has a property named "IsEnabled". class MyViewModel { List<ClassA> MyCollection { get; set; } class ClassA { public bool IsEnabled { get; set; } } } My view has a datagrid which binds to MyCollection. Each row has a button whose "I...

WPF - Query string parameters on page

I am very new to WPF and have what appears to be a simple question: I have a Frame and I set the Source to the Uri of one of my pages. I want to pass some query string parameters to the page, but I am not sure how to access them in the Loaded event of the Page. ...

wpf datepicker

Ok i'm trying to style the datepicker from microsoft from their wpftoolkit.dll. I have it in a grid that is disabled, unfortunately it's background color stays white(despite it being disabled) unlike the other controls that gray out. Ok I did do this: <Style TargetType="{x:Type tk:DatePicker}"> <Style.Triggers> ...