wpf

Slider working along with treeview default highlight

Hi all, I have a treeviews which look like this: 2. Header << Play Video (a) [Duration 0:00 to 0:09] and (b) [Duration 0:10 to 0:44] on click a) sub header 1 << Play Video (a) only on click b) sub header 2 << Play Video (b) only on click 3. Header << Play Video (a) [Duration 0:00 to 0:20] and...

How to display wpf Splash screen inside main window?

WPF Splash screen getting displayed just as an image not as a window...i mean ...it looks like first an image comes..then...my window(i mean window with a bar at top) comes in...How do I display image inside my main window ...

How do I reference a font resource in a satellite assembly?

I have a localised WPF application and I need to embed a font for each locale. I have a font added into my project and it's Build Action is set to Resource. If I remove the <UICulture>en-US</UICulture> from my .csproj (which eliminates the creation of the satellite assemblies) the font is compiled as a resource into the project assembl...

Wpf UserControl and MVVM

I am thinking about writing a WPF User Control for my application. I am using MVVM in my application. User control's may require Dependency Properties that can be set my Parent View. when using MVVM, the idea is that the Parent View will eventually create a binding between the UserControls DP with Parent View's VM) Dependency Properti...

Binding a Dictionary's key and value in a listbox with wpf

Hi, I am trying to bind a dictionary's key to a row of the grid in a listbox, and bind the dictionary's value to another row of the grid. key's type is Book, a class thati wrote and the value's type is int. i want to write the elements of the class and the integer value in grid. Can you help me on this? I'm quite confused on determining...

Change TextDecoration programmatically

Hi, I want to underline a text element programmatically in C# (I'm using WPF). I have a DependencyProperty: public TextDecorationCollection TextDecoration { get { return (TextDecorationCollection)GetValue(TextDecorationProperty); } set { SetValue(TextDecorationProperty, value); } } public stat...

How to get the highlighted element only from a WPF combobox?(C# 3.0)

I have a WPF combobox and a button as given below <ComboBox Name="cmbExpressions" IsEditable="True"/> <Button x:Name="btnSubmit" Content="Apply Selected" Click="btnSubmit_Click"/> Now, I have written some text in the combobox at runtime say stackoverflow,sometext,someothertext. After that by using mouse, say I have highlighted "so...

Wpf sticky note app

Hi, I'm very new to this WPF technology, I started with a sticky note application which should looks similar to IPhone's Note taking applicaiton or like the sticky note addin for visual studio Please see this-Visual studio Addin Can anyone please guide me how to achieve this task , or atleast the textbox background with lines inserte...

Visual Studio 2010 WPF Designer issues

Hi, I am using: Visual Studio 2010 Professional, Silverlight 4 Toolkit The WPF Designer don't show (invisible) - while the Component Toolbox is showing the relevant controls, and the Windows->Windows option shows the designer to be active. It does this with ALL XAML for me, regardless of its complexity. I have already tried the /Reset...

Setting a timeline's target in a storyboard

I have a class that contains a Camera property of type ProjectionCamera. I wish to animate the Camera.Position. I don't understand why the following does not work: void StartMove(Vector3D direction) { //Create animation var animation = new Point3DAnimation(); animation.From = new Point3D(); animation.To = animation.From ...

WPF: selected ListView items after showing a dialog window

I have an action Edit in my WPF application, which is bound to items in a ListView control, i.e. it is executed when an item is double clicked or the Edit button in the toolbar is clicked. This action in turn displays a modal window with the editing stuff. Now when I select multiple items in the list, click Edit, the items stay selecte...

WPF MenuItem vs Button behavior in new window when mouse still down

I didn't know how to make the 'issue' (different behavior) more clear in the title, but I'll explain here. In our WPF application, we're using the DataGrid control to list a number of entities. After double clicking a row, we open a new Window and in that Window, there are among other things a couple of MenuItem controls. The problem i...

How to assign Ctrl+, (control plus comma) as the keyboard shortcut to a WPF menu item?

Question I would like to assign the keyboard shortcut "Ctrl+," (control plus comma) to the "Preferences..." menu item. How do I do that? There is a Key.OemComma in the Key enumeration. I have used Key.OemComma as shown in the code sample below. That works fine functionality-wise. But GUI-wise: the menu item is displayed as Preference...

WPF Prism Updating ViewModel

Hi, I am new to Prism WPF world, have one simple question. I have registered my view and viewmodel in the module initialise method like below var navigatorView = new NavigationMenu.View.NavigationBarView(); navigatorView.DataContext = m_Container.Resolve<NavigationMenuViewModel>(); var regionManager = m_Contain...

How do I make mutually exclusive columns in a WPF Data Grid?

Here's my current problem: I have a data grid with 4 columns in it: Year One by Index, Year One by Percentage, Year Two+ by Index, and Year Two+ by Percentage. I want my data grid to make these columns mutually exclusive with its counterpart column. So for example, if I type in a number for Year One by Percentage I shouldn't be allowed...

Visual Studio: Edit XAML file while debugging

The title says it all: I have a WPF application running in debug mode, and I would like to change the XAML while the application is still running. I'm not asking for Edit-and-Continue. I don't mind that I will have to restart the application for the changes to become effective. I just want to be able to make changes to the XAML file whi...

WPF Generics:How to define a list of objects as parameter of a function

I want create a generic(genaral) method which accepts the return types of LINQ 2 SQL query (a list of objects- IEnumerable) againist different table as the parameter of the function. How can i define my parameter for the function ? I will use this function to bind the data to a grid. Thanks in advance ...

WPF Triggers and DependencyProperties or How to get Validation.HasError for many fields.

This problem has several ways of being solved and that explains the complex title. I have a object that can be changed in a form in my WPF app. I wan't the save button to be Unenabled when there are validation errors in the form. I'm using IDataErrorInfo to notify to UI when there are errors and then I wan't a trigger on DataTemplate t...

Passing parameters to a subroutine from a WPF button

I have a VB.net WPF application that creates a list from a databind. For each row in the databind, it generates a textblock that displays the information from different fields in the databind. It also generates a button which I would like to run a subroutine when clicked. When I click the button, I want it to be able to get the informat...

TextBox.Text Leaking Memory in WPF Application

I have an application that does a large amount of number crunching on an array of numbers. I have it set to every 100,000 operations to display the status of those numbers. This is just sort of a visual indicator to the operator that the application is still processing, and how close it is to completed. After running the application for...