Hello,
I just have mixed feelings about MVVM. It seems I need to code so much to get the most remedial things to work. I miss events (commanding is such a pain), and I miss having a reference to the view!
I was just wondering about your feelings of MVVM vs the plain old code behind way. What do you like better and/or what do you normal...
In the code below, I would like to display a status message while fetching some data before and not display a dialog populated with that data until the data fetch is complete. But the dialog is instead being displayed before the data gets there.
What am I doing wrong?
Cheers,
Berryl
ProjectSelectionViewModel vm = null;
SetStatus("Fetc...
I have this hierarchy of XML
<Chapters>
<Chapter @num="">
<Section @letter="">
<Heading @num="" />
</Section>
</Chapter>
</Chapters>
I need to do a sort so that all chapters are sequenced in ascending order, each section within that chapter is sequenced in ascending order, and each heading in that section is sor...
Hi everyone,
I have an object model like this:
class Car
{
public string Manufacturer;
public int Mileage;
public ObservableCollection<Part> Parts;
}
class Part
{
public string Name;
public int Price;
}
And I want to display the total price of "all my cars" to the user. I want to accomplish this with DataBinding...
Hi,
I am trying to use MVVM light to achieve something like this. I have the following scenario:
In my Model--I have set the properties like ActivityName,Image and there is a class constructor whose is accepting 2 parameters like name and image.
Im my DataAccess--I have set the database connection and implement the required method who...
Hi All,
I want to move the images one by one like slides. i am using the following code to move one image. How to apply this animation to all the images in the image folder.
Code:
<Image Name="img" Width="50" Height="25" Grid.Row="3" HorizontalAlignment="Left" Source="btn_audio_stop.jpg">
<Image.Triggers>
<EventT...
We are facing a strange problem. We have a user control written in WPF and we have added a click event handler in the xaml file. On local system it works as expected. But when the build is generated on the server (where we have the code repository), we notice that the resultant build has a bug. The bug is that the click event is generate...
I want to play flv file in WPF MediaElement.
...
Can we Debug Xaml in WPF? Is there any external tool or VS plugin which can do that?
...
Iam Trying To Create a WPF Window in a Workflow Com Service
but iam getting the following Error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: The calling thread must be STA, because many UI components require this.
at System.Windows.Input...
I have a WPF Datagrid (.NET 4.0) with a list of viewmodel bind to ItemsSource.
The viewmodel exposes the model entity that is builded from a base ancestor class that implements IEditableObject interface.
Every time I edit a cell of a datagrid row the beginedit method of entity is called; I would a different behaviour: call the BeginEdi...
Hi guys
I've got a Problem. I need to use some classes from another Library DLL, that has been written a year ago, in my WPF Project. Therefore I reference this Library in my Project. But when I want to rebuild my solution I always get some warnings that my assembly cannot be resolved because it uses some dependencys that do not match m...
Hi,
I am having a list box, and its item template is having one check box.
Now, when I click on the check box in the listbox, it sets the checked status of the check box. If I use keyboard "Space" key, I cannot change the checkbox state.
Note: Keyboard is shortcut is working once I set focus to the check box by clicking it.
...
Hey,
I want to use background music in my WPF Application.
Like you can see here: http://stackoverflow.com/questions/3148965/how-to-do-background-music-for-my-wpf-application
So I use a MediaElement.
Now I want to change the source of it while running the Application.
I'm already doing something similar with some background pictures....
I like Silverlight because of the following, in brief:
-declarative GUI language (XAML)
-data and command binding
-GUI designer
-MVVM pattern
-strong typed language.
But Silverlight isn't available everywhere. I'd like to investigate alternatives which doesn't involve any browser plugin. Basically javascript frameworks with a compiler t...
Hello,
I need to control the number of rows in a grid.
Without using the MVVM pattern, I achieved this with code-behind, this way :
<UserControl>
<Grid x:Name="PART_Host" />
</UserControl>
private void UpdateHost(int rowCount) {
PART_Host.RowDefinitions.Clear();
PART_Host.Children.Clear();
for (int i = 1; i <= rowCoun...
I'm trying to make only the header of the TabItem send an event.
So far I have my xaml...
<TabControl>
<TabItem Header="tab 1">
Any text
</TabItem>
<TabItem Header="tab 2">
<TextBox>blah</TextBox>
</TabItem>
<TabControl.Resources>
<Style TargetType="Ta...
Hi there,
I have found several articles on the Web regarding drawing a dashed line in WPF. However, they seem to revolve around using the Line-class, which is a UIElement in WPF. It goes something like this:
Line myLine = new Line();
DoubleCollection dashes = new DoubleCollection();
dashes.Add(2);
dashes.Add(2);
myLine.StrokeDashArray ...
Hi there,
Our company executives have requested the integration of a "Star Wars crawl" style credits screen for our About box in our application and I've been tasked to complete this within a week. We have recently ported our WinForms application to WPF and therefore we're all very new to WPF.
As I'm even newer to WPF, I'm not sure wh...
I have a Window and using MVVM light toolkit to bind to the Loaded event:
<Window
...
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
...
>
<i:Interaction.Trigg...