I have a Listbox in WPF with the SelectionMode set to Multiple, and can multiselect the items in the Listbox. However, the SelectedItem is not updating the Observable Collection it is bound to.
Is there a way to bind the multiple selected items from a ListBox to an Observable Collection?
...
Hi,
In my WPF application I'm hosting a custom Windows Form User Control together with other wpf controls. My custom user control is hosted in wpf using a WindowsFormsHost control. This custom user control contains (the parent so to speak) other custom win form controls (children controls). The children controls can be single or composi...
I've been trying iterate through the selected items of a listbox in WPF, with the following code;
try
{
for (int i = 0; i < mylistbox.SelectedItems.Count; i++)
{
ListItem li = (ListItem)mylistbox.SelectedItems[i];
string listitemcontents_str = li.ToString();
...
I'm having trouble running a full trust WPF 4 XBAP (browser application), created with Visual Studio 2010, from my intranet. I do not get a ClickOnce elevation prompt, as described in ScottGu's post on WPF 4:
Full Trust XBAP Deployment
Starting in WPF 4, the ClickOnce elevation prompt is also enabled for XAML Browser Applicati...
Hi... I am making a Excel Addin in VS2010.
The following code work fines if I make a winforms usercontrol
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
var testControlView1 = new UserControl1();
var MyCustomPane = this.CustomTaskPanes.Add(testControlView, "Hello");
}
However I would like to m...
I have a WPF Grid with a XAML similar to this:
<Grid width=200 Height=200 >
<Grid.ColumnDefinitions >
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" ...
How do you build WPF MVVM applications and user controls test-first?
I find myself writing ungodly amounts of XAML with DataTemplates before I even get to unit-testing my viewmodels. Should I develop the whole viewmodel system first before even writing XAML for it?
Any help appreciated.
...
Just as the question asks.
I have an Esri map control and want to add a Rastor image to the control in WPF and don't know how to do it. I see that I can add layers to the Map control, but is there a way to add a Raster image to a map control?
I did find this code to turn the raster image into a Dynamic layer, but Im still lost on how ...
Hello everyone,
I have an user control, It is editable text block. The content of the control is:
<DataTemplate x:Key="DisplayModeTemplate">
<TextBlock
Text="{Binding ElementName=mainControl, Path=FormattedText}"
Margin="5,3,5,3" />
</DataTemplate>
<Style Ta...
I'm working on upgrading a really old VB6 app to a WPF application. This will be a page-based app, but not a XBAP. The old VB6 app had a start form where a user would enter search criteria. Then they would get results in a grid, select a row in the grid and then click on one of 3 buttons. I am thinking that what I'll do is use hyperl...
Like any MVVM WPF app I have a handful of view models. Each has a few commands. My view implements a Fluent UI (Office ribbon) so there are some items that light up based on the context of the application. The ribbon is a child to the main application.
The basic structure of my app is that it manages a COURSE. A COURSE has multiple MODU...
I am using an ItemsControl to display a List<byte> in hex. The ItemsPanelTemplate is a UniformGrid with a fixed number of columns:
<ItemsControl
HorizontalAlignment="Left"
VerticalAlignment="Top"
ItemsSource="{Binding}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="16"/>
...
I am using Prism for a new application that I am creating. There are several lookup lists that will be used in several places in the application. Therefore it makes sense to define it once and use that everywhere I need that functionality. My current solution is to use typed data templates to render the controls inside a content control....
I have a really basic user control with a button that has an image. I want to animate the image of the button, by changing it to a different image.
<UserControl.Resources>
<Image x:Key="GlyphDefault" Source="pack://application:,,,/X;component/images/Glyphs_Default.png" Height="8" Width="8" />
<Image x:Key="GlyphClicked" Source=...
What would be the best (easy and fast) approach to plot live ECG data in a WPF application? I am thinking about writing my own control that would use paths to visualize the signal. But maybe there are ready to use graph libraries that suite my need?
Do you have any experience in that area?
...
I have an ItemsControl containing a list of data that I would like to virtualize, however VirtualizingStackPanel.IsVirtualizing="True" does not seem to work with an ItemsControl.
Is this really the case or is there another way of doing this that I am not aware of?
To test I have been using the following block of code:
<ItemsControl
V...
So how do you display complex aggregated ViewModels whose Models have relations to each other?
NO wpf disciple ever spoke about that, guess why its not possible...
Do you think thats true?
Don`t understand me?
Look: A CustomerViewModel has many OrderViewModel and those many ProductViewModel.
You have 3 Workspaces to enter the new d...
Hi,
I'm new working with Prism with WPF, and I have a question which I can't find answer.
Why it is impossible to add a window in a Region ? I can understand there's a good reason, so I will need another solution to my problem.
It is quite simple, I got a LoginView (Window) which I want to appear first. For the previous reason, in my ...
EDIT - After playing around with a bunch of potential solutions (using backgroundworker and separate threads) I've found the key issue here is getting the data binding to be 'interrupted'. Since the progress bar is an animated circle (not a percent complete) it needs to respond to a timer event at consistent intervals to smoothly animate...
I've set up my DataContext like this:
<Window.DataContext>
<c:DownloadManager />
</Window.DataContext>
Where DownloadManager is Enumerable<DownloadItem>. Then I set my DataGrid like this:
<DataGrid Name="dataGrid1" ItemsSource="{Binding Path=/}" ...
So that it should list all the DownloadItems, right? So I should be able to set...