wpf

WPF TabItem Content alignment is always centered

I'm trying to put some content inside my TabItem, but I can't add a container that fills the space of the TabItem. Anything that I add shows up centered. I'm using a Theme from WPF Toolkit (WhistlerBlue.xaml), so I think that maybe it's that what is causing me this issue. I cannot remove the Theme, because I need it. At most I could ch...

Entity Framework: Context in WPF versus ASP.Net... how to handle.

Currently for ASP.Net stuff I use a request model where a context is created per request (Only when needed) and is disposed of at the end of that request. I've found this to be a good balance between not having to do the old Using per query model and not having a context around forever. Now the problem is that in WPF, I don't know of a...

WPF ListView Programmatically Select Item

Oh, man. I'm feeling the WPF pain this week. So for my next trick, I'm now unable to figure out how to select an item programmatically in a ListView. I'm attempting to use the listview's ItemContainerGenerator, but it just doesn't seem to work. For example, obj is null after the following operation: //VariableList is derived from Bi...

WPF - Why is my buttons content moving separately from the button itself?

I have created a TabControl in a WPF application I'm writing. I re-templated TabItem so that I could have a button on each tab header to close it. So far, all is well and good. I decided that I now wanted shiny round buttons instead of the default square ugly things. Also, I wanted to use an image as my buttons content instead of simply...

Scrolling Content Inside A Border With CornerRadius

I'm looking for help with a WPF problem I've been wrestling with for a while. I've styled a tab view, moving the tabs onto the left and displaying them vertically. These tabs sit inside a border with rounded corners at the top and bottom left. I'm running into a problem when the tabs are scrolled. Instead of the rounded corners clippi...

WPF for non designers

Is delving into Microsoft's WPF worth it for a programmer who does not have design inclinations and no designer on the team? ...

Hidding the Arrows for the WPF Expander Control

When using the WPF Expander control it is displayed with the default "Up" and "Down" arrow keys. Is there any way to hide those up and down arrows? UPDATE: I managed to remove the arrows by creating a ControlTemplate but now the expanding ability is gone also: <ContentPresenter Content="{TemplateBinding Expander.Header}"></ContentP...

100% responsive UI in WPF

Hello, I have a WPF application that uses a component that sends a bitmap to my application as they become available, I receive those bitmaps in a delegate I pass to this component. I created a new thread for this process and it works very well, the bitmaps comes as MemoryStream and I just create the BitmapSource object from this stream...

Structuring Memory Viewer Contol in WPF

What is the best way to design a memory viewer control (a la Visual Studio's Memory Window)? The control will be mapped onto a byte array and a value representing the starting address (optionally, the control could be mapped onto an object that interfaces to "memory" directly with read/write methods and events for memory changed). The ...

TextBlock to Display HTML in WPF

Is there anyway to display HTML from a string variable to the TextBlock in WPF? ...

MouseDown on ListBoxItems with databinding (WPF)

I have a ListBox with databinding. I need to fire an event when a user clicks on one of the ListBoxItems, but I can't quite work out how to do that. I tried putting a Grid on the ListBox.ItemTemplate and putting the MouseDown event on that: <ListBox Name="popupListBox"> <ListBox.ItemTemplate> <DataTemplate> <...

Windows Workflow Strong-Naming Mismatch

When I save a workflow XAML file with assembly references, they will be saved with the strong named reference that include the version number. When I upgrade the application assembly that the XAML file references, the XAML file is no longer valid and cannot open because it says that it's missing the assembly I updated. How do I fix thi...

User Interface Interaction with the MVVM

I did some googling and didn't find an answer to this puzzle. Provided you have the following: MySuperView MySuperViewModel MySuperView has two textboxes both bound to string properties on the ViewModel and your using a DelegateCommand to bind your 'Save' button to the ViewModel using syntax such as: ViewModel: this.SaveOrderComm...

WPF application is crashing when we change the number format in regional settings.

In my WPF application where I am using one user control containing some radio buttons and style & color settings from one resource.xaml. When I change the Number format in Regional Settings (Changing decimal seperator as "," and digit seperator as "." ) the application crashes. But if I launch the application by Enabling the Visual Studi...

Trigger to Update Properties of a Parent Object in WPF

I am trying to change the Background Color of the ParentGrid when the child control ( Button ) ChildButton is clicked I want to achive this using Triggers but not sure if this is even possible Please Suggest a way to DO this through XAML only <Grid Name="ParentGrid" Background="Red"> <Button Name="ChildButton" /> </Gri...

Custom Expression for TextDecoration in Expression Blend

How to set a Custom Expression for TextDecorations for a TextBlock in Expression Blend2? For Eg: a Custom expression for StrikeThrough ...

Let WPF Tabcontrol height assume height of largest item?

Is there any way to have to tabcontrol take the size of the largest tab item (well, actually, the tabitem's content)? Since the tabcontrol has no specific size assigned it should autosize: it does that correctly, but when you switch tabs it automatically resizes itself to the height (and width) of the contents of the currently selected ...

WPF-xaml Calculating Total of text box values.

Hi, I have a wpf xaml form which has 5 text boxes shows order price. Below the 5 text boxes i have another textbox:[subTotal] which displays the subtotal of order price's."SubTotal" Textbox should display the subtotal of order prices automatically. Is there any XAMl coding way where i can calculate and dispaly total in the "SubTotal"...

How do I tell my application which resx file to use when it is passed a culture it doesn't understand? (WPF)

Subject says it all. I have Resources.en-US.resx, Resources.de-DE.resx, etc. I don't ever want the basic Resources.resx file to be referenced. If someone passes me a language that I don't have a resx for I want it to drop back and use Resources.en-US.resx. Anyone? ...

Binding to a value within a Resource?

Assuming one has this Resource: <Window.Resources> <ImageBrush x:Key="MyImageBrush" Opacity="0.5" ImageSource="image1.png" Stretch="None" AlignmentX="Center" AlignmentY="Center" /> </Window.Resources> Then how would I get to the Opacity value of that resource? I've tried the following but it doesn't work. ...