If I have a WPF DataGrid that looks like this: <DataGrid x:Name="DataGridQ" AutoGenerateColumns="False" Grid.ColumnSpan="2"> <DataGrid.Resources> <Style TargetType="{x:Type DataGridRow}"> <Sette
I cant bind the variable from code behind in my wpf radiobutton Can anyone help me to display the values from the variables in the content from the radio button. MainWindow.xaml: <RadioButton GroupName="Preis" Grid.Row="10" Content=
I am currently trying to print the contents of a content container (it only contains datagrids with information) and an image using PrintFixedDocument. It prints flawlessly on my machine (windows 10) with full image quality and on another pc which is
I have a textbox in WPF and I need to display text in xxx-xxx-xxxx format. <TextBox FontSize="30" Text="{Binding MyString,UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" MaxLength="10"></TextBox> MySt
I'm Currently Working on a windows 8.1 Application and im trying to set the value of a textblock that is inside of a Pivot Page. When I try to set the value of the text Block I get a weird error about a Null Refrence Exception. The Code for the XAML
im trying to bind the width of a button and a TextBox to the width of a column they are in. Additionally i want to change the visibility of the whole grid. I set visibility to "Collapsed" and in the code behind file i change the visibility to vi
I created a custom header for my GroupBox like the following image: I want also to set a Binding on the Backgroud of this header, so I wrote the following code: <GroupBox Width="130" Height="80" BorderBrush="Black" Margin=
I have a defined list box like this: var listBox = new ListBox(); listBox.Items.Add(1); listBox.Items.Add(2); listBox.Items.Add(3); And I want to set focus directly to an item in the listbox. If I do this: listBox.SelectedIndex = 0; listBox.Focus();
I have a DataModel and a ViewModel working successfully together with my xaml view. In the view I use databindings. In my DataModel I have some properties like Distance declared as int. When displaying the values in view, I want a formatting like add
I have a sub project wich is a class and contains DataLib.cs and an user controll MediumTile.xaml. This user control will be the generated to an image to use it as tile background. But before I have to change a few thing dynamicly. So how can I get c
I am trying to learn about Storyboards and animation in WPF. I have a very simple question which I cannot seem to answer. I have a rectangle that is placed in a grid. I am trying to move the rectangle from one side of the grid to the other side. I ca
WPF/VB.net newbie here. I'm trying to filter rows in a datagrid and having a fun time. I've managed to create a list of objects and use the itemsource property to get the datagrid to populate. Now I have a checkbox that for arguments-sake I want to c
So I've been trying to make a list item that will toggle a checkbox when the listbox is fired. I have been able to successfully do this when binding isn't involved, but once I add binding it never updates the binding, but still updates the ischecked
I have a textBlock <TextBlock Width="180" Text="{Binding Details, UpdateSourceTrigger=PropertyChanged}" and in the viewModel public string Details { get { string strInfo; strInfo = Resources.SharedOn+": " + DateString; str
I have a specific situation in my code where it would be very good to do something like this (pseudocode): aView = new View(); aView.Show(); doSomething(); and I want the "doSomething()" to run only after the "aView" window closes. Is
I've read the online document about data binding but still couldn't make it work. I simply want to understand data binding and do things the way it should. Here is my code in my UI.xaml.cs namespace mynamespace { class Customer { private string _name
My form is bound to an object that implements IDataErrorInfo and it validates correctly on a field by field basis. I would like to have some way to summarize the results based on the fields on the form, and not the Error property of IDataErrorInfo. I
OK... so this solution doesn't help XAML is here <ListBox ItemsSource="{Binding Path=ContentItems}" Background="White" > <ListBox.ItemTemplate> <DataTemplate> <Grid Margin="2" Height="Auto" Widt
Am trying to figure out which of the passed in array of CustomPopupPlacement positions have been used when the popup actually renders. Is there any event to detect this? This msdn thread from 2009 seems to be exactly my issue however there does not s
I am globalizing my WinRT app and I can't use language resources in my comboboxs. I can use it in my TextBlocks using Text property but not using x:string. What am I doing wrong? TextBlock x:Uid="Priority" Text="Default"></TextBl
The Source attribute of the Image tag works only with the files which were added to the 'Assets' folder in the Solution Explorer. I've got two files in the Assets directory: Logo.png and Logo2.png, but only Logo.png is added to 'Assets' in the Soluti
I'm starting to get a little confused as I delve further into WPF and I feel like this example will help in better understanding things. My requirement is this: I have a ListView that is using a binding to a collection of plain .NET objects, I want t
I have a custom converter that I want to make use of in xaml. The converter just places Admin if value is equal to 0, Cashier if it is equal to 2 etc.. Anyways this is what I am looking for. <ComboBoxItem Content="{Binding 'I want to place the val
I'm building an application that needs to display and accept dates from my model ( which is retrieved from a database). The model exposes a property called EntryTime: private DateTime entryTime; [Column] public DateTime EntryTime { get { return entry
I have a TextBox control defined in XAML and I want to apply different background colors to the TextBox based on its IsReadOnly or IsEnabled properties. I used dataTriggers to actually switch between the colors as shown below: <Style x:Key="TextBo
I can't seem work out (even though I have seen other apps) how to set the whole background of a WP7 page to a image or colour, like in Panorama for example. If i set Grid x:Name="LayoutRoot" Background="#FF0079C1" Or <Grid.Backgroun
I'm currently using a library that implements Menus and ContextMenus for Silverlight 3 and 4. This library defines a MenuItem class in the System.Windows.Controls namespace. No problems with SL3 because there is no MenuItem class elsewhere in the Sil
I'm using a Grid in WPF (xaml) and I'm have some strange effect when using the MinWidth property in a ColumnDefinition. For example, when I use 9 ColumnDefinition and every ColumnDefinition has the 'Width="*"' property and one of the middle colu
When I create a user control in WPF it would appear that all the children of this control are declared as internal? I've not been able to verify this, nor finding any resources discussing this matter at all. I can access the controls in the same asse
Why not use partial class to build the ViewModel? Since the definition of viewmodel classes have some definition of the data classes of datamodel, why not try to reduce some work, extending or making partial classes of the datamodel, completing them