wpf

GeometryModel3D Area and Volume

Is there a way to calculate the Area and Volume for a given GeometryModel3D? ...

Validate DataGridTextColumn with ValidatesOnExceptions=True after converting data from String to Integer

Hi, I have a WPF DataGrid With a Text Column. DataGrid is binded with a LIST<> and DataGridText Column is binded with a String Property but the value in this property can be only Numeric. But the Numeric validation on the DataGridTextColumn can't happen with the String value. So i have converted the value from String to Integer using a ...

WPF Prism and the Ribbon Control

I am working on a line of business application for our company and I came across Prism. I have never worked with it before but the concepts it talks about sound a lot like what I did for the last project in Winforms. I had a ShellForm and then multiple User Controls. Anyway, assuming I am not seriously misunderstanding what Prism is ...

Can ICommand be use for simulating Combobox Selected Index Change or it is something else?

If I want to write a custom command for a button control in WPF, I can go ahead with ICommand. How about the case for Combo box Selected Index Change event? Is it possible to do the same using ICommand or something else will help me out? Help need both in concept as well as a simple example(if possible) or a web link that will help in ...

Installing WPF application on machine without .NET Framework 4

I am using Visual Studio 2010 to create a Setup package to install a WPF application. I can see that I can add the .NET framework 4.0 as a pre-requisite, but how do I get his to run automatically without manual intervention? Do I have to create a small program (that targets framework 1.1 as I assume most machines have 1.1) that detects ...

Event Bubbling click event in WPF Xaml.

I know that events in WPF bubble up the visual tree, so I don't understand why this simple example of catching the event of a context menuitem click event on it's parent listbox doesn't work: <ListBox Width="200" MenuItem.Click="MenuItem_Click"> <ListBoxItem> <TextBlock Text="Hello"> <TextBlock.ContextMenu> ...

Are all WPF controls FOCUSable ?

Hello, are there any default exceptions where wpf controls are not focusable? My controls need to be all focusable, but I do not want to set everytime I create a control make focusable="true" ...

How to switch tab programatically?

Hi everyone, I have a ribbon in my view named 'ribbon' that have 2 tabs as below sample codes. I want Button1 when clicked will open Tab2 and vice versa. How would I do this? <ribbon:Ribbon x:Name="ribbon" HelpPaneContent="{x:Static data:WordModel.Help}"> <ribbon:RibbonTab Header="Tab1" ... > <ribbon:RibbonGroup x:Name="Butt...

WPF applications hanging in some scenarioes! But WHY?

Hi! Check out following scenario: A User control which contain two combo boxes... First combo box contain list of States and Second combo box contain list of Cities. When you select a state the second combo box will contain list of cities using a LINQ query. When you select another state in first combo box the second combo box's items ...

Not able to enter text in a TextBox inside a GridView/ListView (WPF)

I have a TextBox and a DropDown inside a ListView which is binded to a viewModel. While comboBox is working fine, i am not able to "enter" any text inside the TextBox. Backspace/SpaceBar/Ctrl+C/Ctrl+V are working just fine, but as soon as i press any alphanumeric key, it doesn;t shows any text in the TextBox. Have also checked using emp...

ItemsControl with static header

Hi I think I have a pretty simple goal but cant seem to reach it. All I want to achieve is to have a ItemsControl (because I don't want the selection functionality of a list) with a header. Preferably a static header. Currently I'm using a grid for the header and then copying that grid into the ItemTemplate (DataTemple) of the ItemsCo...

Searching workaround to apply Localization on Ribbon Control using LocalizationExtension from codeplex

Hi, My application has to support multiple languages and should be able to switch the language on run time. For that purpose I am using LocalizationExtension from codeplex (http://wpflocalizeextension.codeplex.com/) I am using Ribbon Contorl in my application. I am creating ribbonCommands as window resource and Binding the LableTitle an...

General WPF Application

Am just creating myself a WPF application, like outlook. am having all forms seperately. I just want one main window and and am haivng navigation pane in left side. when ever i click items in pane, i just want to load corresponding form to the main window in right container. How i can do this? ...

In WPF how do I Resize main windows during the runtime.

I want my main WPF window during the runtime, when there is not enough space for my control, to resize itself. I could create a window which takes a maximum amount of space on the screen and make it transparent, but are there any other ways to do it? ...

DataGridCheckBoxColumn updates source and is validated only after focus loss.

I have a problem with DataGrid from WPFToolkit. My grid has DataGridCheckBoxColumn. When I change value of some cell in this column, validation and real source updating occures only after a cell has lost focus. So, if I change checkbox value in a cell and leave focus inside it, the property of a binded object wouldn't be changed. Colum...

Exapand wpf menu depending on situation

How can I customize the menu to the situation in WPF? I have a main window with a basic menu. In this window, I can load different UserControls and then I want the menu to be expanded with different menu options depending on which User Control is used. In addition, I wonder how I add a MRU. Example: Main menu: File Open - MR...

WPF rendering without graphic card

I have a WPF application that runs as a service and renders 2D graphical elements to take jpg snapshots. All this happens without any Window or visible control. The application typically runs on servers with very crappy video adapters: does this have a negative impact on the application's performance? Is there a way I can tell WPF/.NET...

WPF bind property to Dependency Property in child control

Ive created a custom UserControl that contains a single combobox. The currently selected value in the combobox is bound to the custom UserControls Dependency Property. XAML: <UserControl> <ComboBox ItemsSource="{Binding AllEntries}" SelectedItem="{Binding SelectedEntry}" /> </UserControl> Code behind: public part...

WPF: Page to page navigation from listbox menu employing frame technique?

I got a problem. I added a frame in the window xaml to load pages in. I can directly load a page into frame with Source tag of the frame. It works. I need to use the code in C# to refer to the link from listbox menu a poplulate an apropriate link when an listbox item is selected. My problem is that I cannot refer the frame in C# code, it...

How to access children in Grid with x/y coordinates instead of index?

I have a Grid object and want to get a specific checkbox out of it. I can use this syntax: CheckBox cbChange = grid.Children[4] as CheckBox; But how can I access this child via x/y coordinate instead, e.g.: CheckBox cbChange = grid.GetXYChild(2,3) as CheckBox; //PSEUDO-CODE using System.Collections.Generic; using System.Windows;...