wpf-controls

WPF: ItemsControl with scrollbar (ScrollViewer)

I followed this small "tutorial" on how to add a scrollbar to an ItemsControl, and it works in Designer view, but not when I compile and execute the program (only the first few items show up, and no scrollbar to view more - even when VerticalScrollbarVisibility is set to "Visible" instead of "Auto"). Any idea on how to solve this? Th...

How to Inherit a Control Template

I working on a WPF project where I've over-ridden the checkbox control for some special operations. That is working correctly. My problem is that the control template that was applied from the theme (shinyred.xaml from codeplex), is not applied to my over-ridden control. Is there a way to inherit the checkbox control template for use ...

How to add global exception handling to a add-in dll?

Here's my context: I am writing a WPF add-in for an application. This Application's main thread is unmanaged. I want to add a global exception handling system for this add-in to handle any unhandled exceptions. Here's what I've tried but not working: I cannot add a try-catch block to my Application.Run() code line. Because I am an ...

WPF Listview modification

For a very specific reason I want to select ListViewItems on mouse button up, not actually on mouse button down. I want this behaviour to be embedded in the control. Is it possible to achieve this? can anyone give hint? ...

How Can I Open a WPF Popup with a Delay?

I simply want to open up the WPF Popup with a delay, sort of like a ToolTip. How can I achieve this? And, by the way, Popup.PopupAnimation = PopupAnimation.Fade ... fades in too quickly. I want at least half a second in there. ...

Styling WPF controls inline with Infragistics themes

Hi, we are using Infragistics WPF controls (e.g. xamDataGrid, xamDockManager etc), and we will be using the Infragistics Office 2007 Blue theme which these controls support. We also want to style the rest of the application (i.e. standard WPF controls) using the same Office 2007 Blue style. What's the best approach? Are there Office ...

How to set FontSize of a Textblock, which is in a Viewbox

I can't set the FontSize of the Text in a TextBlock, since the TextBox is in a Viewbox. Why? ...

Adding a window listener to a WPF-Window?

How can I add an window/event listener/handler to a wpf-window? I want to know, if the user wants to close the window. ...

Wpf button second click

hi everyone. i wanna ask second button_click event. i have grid on a window. when i click the button, i wanna grid to be visible and when i second clicked the button.i wanna grid to be hidden. like windows start menu. my codes are as follows. thanks in advance. private void Topics_Click(object sender, RoutedEventArgs e) { ...

How do I programatically change a DockPanel in WPF?

Note:By Request, I have added the full code for my XAML and xaml.cs files In WPF, I have created a DockPanel like so: <Window x:Class="RealEditor.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:forms="clr-namespace:System.Windows.Forms;assembly=Sys...

WPF TextBox Validation

I have validation hooked up to a model that is bound to the textbox container. When the window is first opened validation errors appear as the model is empty, I do not want to see validation errors until submit of the window or the text in the textbox has changed or on lost focus. Here is the textbox. <TextBox Text="{Binding ...

WPF: Adding an image to a ListBox ItemTemplate

Hi--I am creating a WPF app with a list box that I am binding to project names. As a decorative element, I want to place a small icon next to each item in the list, similar to the way Outlook does in its Personal Folders list. For starters, I am going to use the same image for all items in the list. Here is the markup that I've got so f...

c#: Choosing or modifying a control to create draggable graphics on a canvas

I'm attempting to write a small app that will do something similar to what is shown here: http://www.soccertutor.com/tour/MASTER_SKIN_team.swf However I've not used WPF/Win Forms very much at all and can't seem to find a control that will be most applicable to the situation. I want to have some sort of grid for the pitch so I can have ...

WPF Tab Control: Setting Tab Color?

I have a tab control in my WPF application that uses the default colors for the WPF tab control. In other words, the active tab is white, and the inactive tabs are silver. I have changed the background color of all of the tab pages to Beige, by setting the Background property of the TabControl object, but it doesn't change the tab color,...

Black background before loading a wpf controll when using ElementHost

I'm using WPF in WinForms with ElementHost. When the form loads, there is a flash of black background where the ElementHost is about to load. This looks kind of bad. Any suggestions on how to get rid of this? ...

Building a great dashboard app in WPF -- what are the controls available out there?

My application collects business data from various sources, aggregates it, groups and filters, and needs to display it. Pretty uncommon, right? =) The point is that I already have a "drill-down" UI, so the Services and Operations people can find their data in the tree view and do their job. But now I also need a shiny high-level dashboa...

Set superscript and subscript in formatted text in wpf

How can i set some text as subscript/superscript in FormattedText in wpf ...

Putting a ContentControl *inside* a WPF DataTemplate?

I have a custom Expander control called SpecialExpander. It is basically just a standard Expander with a fancy header and a couple properties (HeaderText and IsMarkedRead). I began by creating a simple class: public class SpecialExpander : Expander { public string HeaderText { get; set; } public bool IsMarkedRead { get; set; } ...

Changing text color on a WPF Calendar?

Is there a simple way to change the text color of a WPF Toolkit Calendar control? I thought it would be simple, but it appears that the color is hard-coded. To change it, I am going to have to go pretty deep into the control templates for the Calendar and its component parts. Doing so has some undesirable side effects. Here is an examp...

Does Visibility = IsCollapsed skip the data-binding part?

If I set a StackPanel or what ever bound area I have as 'Collapsed', does the data load? Will it trigger its Loaded event? ...