wpf

WPF StringFormat={}{0:N} Error "Expected '"

I'm getting an error in VS 2008 SP1 with WPF using the stringformat binding, is there an inherent problem with wpf in vs 2008? Error 1 Expected ' ConstituentCrossrateGridControl.xaml 70 141 PriceViewWpfLibrary ...

Is it possible to make customizable WPF styles?

I really like WPF because of its awesome skinning support by changing resourcedictionaries on the fly, but the catch is, the styles must be made by designers in XAML. My client needs a skinnable UI where the end users can make skins themselves. My question is - In Photoshop, you can take any image, and add a color overlay to change all ...

How can I create wpf Carousel withmy listview items?

Hi All, I have horizontal wpf listview <ListView Name="indexList" ItemsSource="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Top" BorderBrush="Transparent" Background="CadetBlue" Width="450"> <ListView.ItemsPanel> <ItemsPanelTemplate> <Virtualizing...

HOW can I Achieve A Transparen Screen On My button Click Event In wpf

Hello All I want to show A Panel on My Button Click Event And I want There is A transparent Screen Come between panel And other window Control . How CAN i Do it ? i m doing it all dynamic using C# not In xaml. Thanks in Advance shashank ...

MVVM what part of pattern responsible for grouping of datagrid

I've been tinkering around with the MVVM pattern and now I'm trying to implement a little application based on it. This application has a datagrid in which, surprisingly enough, some data is presented. Now I'm trying to add some grouping ability to it. I know how to write this in code (C# and XAML), but I'm wondering in what layer I sho...

WPF: How to programmatically utilize the ErrorTemplate of an Control?

Hi, is there a way to programmatically set and remove the ErrorTemplate of an Control without the whole Validation mechanism? Basically, what I'd like to do, is to retrieve the ErrorTemplate of an Control at some point like this: ControlTemplate errTemplate = Validation.GetErrorTemplate(myTxtBx); and temporarily use it as it's Contro...

How do I handle click events on multiple similar buttons in WPF?

I'm a C# beginner and am trying to implement a numeric pad in WPF. It consists of 10 similar buttons: <Button Content="0" Name="button0" Click="anyButtonClicked" /> <Button Content="1" Name="button1" Click="anyButtonClicked" /> <Button Content="2" Name="button2" Click="anyButtonClicked" /> ... <Button Content="9" Name="button9" Click="a...

WPF 3D extrude "a bitmap"

Hi, I'm looking for a way to simulate a projector in wpf 3D : i've these "in" parameters : beam shape : a black and white bitmap file beam size ( ex : 30 °) beam color beam intensity ( dimmer ) projector position (x,y,z) beam position (pan(x),tilt(y) relative to projector) First i was thinking of using light object but it seem tha...

How to make the selected TabItem look attached to the rest of the document

I have a WPF app with a few Tabs. I'm now messing around with styling and have for example changed the ControlTemplate so I now have to define everything about the TabItem. Now the TabItem that is selected seems detached from the document below because of some thin line around that content (there is no border). I'm not sure what techniq...

drag drop no longer working once application gets installed.

I have an application that has drag and drop functionality to import images and video's. While developing, and testing through Visual Studio this has never given any problems. After installing through a set up project, everything in the application works fine, except the drag and drop, which seems to be doing nothing. Are there any secu...

MVVM Property for datagrid itemssource

I have a datagrid whose itemsSource is bound to a multiconverter which uses a converter. <toolkit:DataGrid AutoGenerateColumns="False"> <toolkit:DataGrid.ItemsSource> <MultiBinding Converter="{StaticResource ProfileConverter}"> <Binding ElementName="ComboBoxProfiles" Path="SelectedValue" /> ...

How to use IsKeyboardFocusWithin and IsSelected together?

I have a style defined for my ListBoxItems with a trigger to set a background color when IsSelected is True: <Style x:Key="StepItemStyle" TargetType="{x:Type ListBoxItem}"> <Setter Property="SnapsToDevicePixels" Value="true"/> <Setter Property="OverridesDefaultStyle" Value="true"/> <Setter Property="Template"...

wpf datagrid textbox + combobox

I have wpf datagrid with number of template columns. some of them have textbox in them in edit mode and some combobox. i need to give cut/copy/paste facility to user from main menu (ribbon) buttons of my application. when i select some text from textbox and press copy button from main menu. copy button becomes active control so i loo...

WPF Labels look fine in XP, but are cut off at the bottom in Vista and Windows 7.

The following xaml looks fine in XP, but the bottom of the text gets cut off in Vista and Windows 7. <Grid> <Border Height="86" Margin="10,54,10,0" VerticalAlignment="Top" BorderBrush="Black" BorderThickness="1"/> <Label Height="22" Width="100" Margin="15,43,...

WPF DataGrid performance concerns

I am testing WPF DataGrid in hopes of replacing some winforms controls, and so far have been very pleased with the development process. Performance seems to be my biggest concern right now. My development workstation has just about the best cpu on the market running windows 7, with 6 gigs of DDR3 memory. The windows control i am replacin...

Binding dont refresh, even when explicitly calling UpdateTarget

My ListView does not refresh its bindings when i call OnPropertyChanged. I have tried to force it to refresh by: NestedArguments.GetBindingExpression(ItemsControl.ItemsSourceProperty).UpdateTarget(); But still, no luck! YES, it does get updated. I have set a breakpoint and checked. What is going on? Other bindings seem to work wit...

Accidentally deleted the code behind for an Xaml file. How do I add the code behind again?

Instead of excluding it, by mistake, I deleted the .cs code behind file for an Xaml file. Now, I don't know how to add the code behind. This Window is empty with no UI controls on it. "View Code" is disabled and I can't see the Events (lightning bolt icon) anywhere for this xaml. Please help. ...

HOW CAn I Differciate the button click Event

hello All i have a problem. i m making Some wpf button Dynamic through C#.i m using it A loop for this now i m trying to find all button Click Event. i find it But It Work Same on All The button Click how Can i Differciate all the button . thanks in Advance shashank `for (int i = 0; i < 2; i++) { Button b1 = new Bu...

How do I right-align the 'help' menu item in WPF?

I have the following (simplifed) section in my XAML file: <Menu Width="Auto" Height="20" Background="#FFA9D1F4" DockPanel.Dock="Top"> <MenuItem Header="File"> <MenuItem Header="Exit"/> </MenuItem> <MenuItem Header="Edit"> <MenuItem Header="Cut"/> </MenuItem> <MenuItem Header="Help"> <MenuItem ...

WPF TabControl/ScrollIntoView Issue

Hi, I have a TabControl with two tabs containing lists that should always be scrolled to the bottom: <TabControl> <TabItem Header="Tab1"> <ScrollViewer VerticalScrollBarVisibility="Auto"> <ListBox x:Name="List1"> <ListBox.ItemTemplate> <DataTemplate Dat...