so in classic MVVM examples ive seen DataTemplate definitions are used to map up View Models to Views, what is the standard way to do this in MVVM Light framework, and where should the mappings be located? Following are examples of what I'm doing now and what I'm talking about, blendability is important to me!
Main Window:
<Window xml...
Hi,
I have a datagrid with customer data such as ID, name, email, phone etc.
When I select a row (with a button or selectionchanged) I want to store that row's columns in variables like
dim email as string
dim name as string
email = dgCustomers.theselectedrow.theselectedcell
name = dgCustomers.theselectedrow.theselectedcell
If I have ...
So I have the following DataTemplate for a ListBox.ItemTemplate:
<DataTemplate x:Key="Tweet">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
...
Hi,
I'm trying to produce a master/detail datagrid view. I'm using object data providers. Now I have seen many examples when the argument of a method for returning the records for the detail view is a string, like in this example:
<!-- the orders datasource -->
<ObjectDataProvider x:Key="OrdersDataProvider"
Obj...
I'm trying to create a simple toolbar in WPF, but the toolbar shows up with no corresponding buttons on it, just a very thin blank white strip. Any idea what I'm doing wrong, or what the recommended procedure is? Relevant code fragments so far:
var tb = new ToolBar();
var b = new Button();
b.Command = comback;
...
Why does the DataTemplate line break the WPF designer in Visual Studio 2008?
The program compiles and runs properly. The DataTemplate is applied as it should. However the entire DataTemplate block of code is underlined in red, and when I simply "build" the program without running, I get the error "Type reference cannot find public type ...
Hi All
What Is Benefits of Using Wpf?
WPF Software Is Speed Or Windows Form or Not Different?
...
I have an image lock.png beside of my WPF exe file in the images folder.
Now, I'm gonna load it into the WPF Project as an image, I've used the following XAML code:
<Image Stretch="Fill" Source="pack://siteoforigin:,,,/images/lock.png" />
It works, but Expression Blend or Visual Studio doesn't show it when I'm working on the project.
...
Has anyone figured out the best way to persist a WPF and Silverlight RichTextBox content so that it can be shared between the two? I haven't had the time to test through this so I wanted to see if anyone else has.
I currently have a WPF applicaiton that saves the content of a RichTextBox as a blob in the database using the following co...
I have this problem when i try to synchronize a observable list with listbox/view
it displays the first item X times (x total amount of records in the list)
but it doesn't change the variable's
here is the XAML
<ListBox x:Name="PostListView" BorderThickness="0"
MinHeight="300"
Background="{x:N...
I have a class which inherits from Canvas. On the OnRender method I draw a text which is being covered by the controls that are on the canvas.
Is there a method to place the text "above" the controls? is there an OnRenderComplete method (that is being called after the visual tree was rendered)?
...
I'm working on an XmlEditor (similar to XmlNotepad, but using WPF) in which I want to implement personalized menus. I.e. only show the most popular MenuItems on first open, and show all MenuItems when the user explicitly asks for it, either by clicking on the double arrow at the bottom or waiting for a certain amount of time.
I'm speci...
Here's my XAML code:
<Window x:Class="CarFinder.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Search for cars in TuMomo" Height="480" Width="600">
<DockPanel Margin="8">
<Border CornerRadius="6"
...
Is there any way to get the gui thread dispatcher when you have no reference to any elements..
...
I have developed several custom controls in a wpf application that use triggers. what is the fastest way to convert the code so that I have a single code base that works both in the wpf application and the silverlight applicaiton. Here is a sample of the code:
<Style x:Key="sButtonAction" TargetType="Button">
<!--<Setter Property="...
Hi!
I'm currently facing the problem, that I import an Excel file to a DataGrid.
This works pretty fine, but after importing the table, I need to know how many rows are invalid.
I have applied several validation rules for the different datatypes, and I have an icon in the row header, that shows up if the row is invalid.
But since I ha...
Hello,
for my application (WPF) I'd like to use the standard icons for save, open... However, I'm not aware of them being available as vector graphics? So, where can one get them, is it maybe possible to extract them from some DLL files or whatever? Thank you very much!
...
Hello,
I have a Canvas and in it a Border. Now I want to give focus to this Border. Can somebody please tell me how do do this? Seems like it's not that easy ): Thanks for any hint!
...
I would like to add an IsFocused property to a custom textbox that I am working on, is there any way to do this?
...
I have a ComboBox in my WPF form:
<ComboBox Margin="75,0,15,102" Name="videoFormatCombo"
Height="23" VerticalAlignment="Bottom"
DataContext="{StaticResource GroupedVideoFormats}"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource VideoFormatTemplate}">
<ComboBox.GroupStyle>
<Gro...