wpf

How to correctly output a collection of objects in a DataGrid? - WPF

There is a DataGrid with a single column: <DataGrid x:Name="dataGrid" AutoGenerateColumns="False" ... not output anything. As I need specify the data source for the DataGrid, so that it can output them in the described column?

UserControl with parameters in MVVM (C#, WPF)

Hello everyone. A question from a newbie. I plan that at some point in the application, some instance of the UserControl wil ... outside, how do you explain to them that this particular View instance is associated with this particular ViewModel instance?

Cut off milliseconds from TimeSpan

Good day, Hashcode. I have an application in which a simple media player is implemented using the WPF MediaElement. There is ... re-I don't know. PS. As you can see from the code, there is a combination of WPF and WinForms, please do not swear at this :)

C# WPF MVVM ViewModel - Model and ViewModel - ViewModel relationship

I have something like this Window View It consists of 3 regions: File Manager, Workspace, and Menu. I need to make adding ... del notify when the View Model changes? About Prism, EventAggregator I know, I'm interested in a solution without framework

How can I use the mvvm c# wpf pattern to process an event?

I am trying to implement the application according to all the rules of mvvm, and I ran into an event handling problem. For ex ... s a text field that the TextChanged event is bound to, but according to the rules, the method is processed in the viewmodel.

Can ModelView have a reference to the View in the MVVM pattern implementation?

I write a program in WPF, using the MVVM pattern. I need to change from ModelView a certain property of the button described ... o this? Would this be a good solution? If not, how to implement it correctly (how to work with window controls in ModelView)?

Wpf c# Animation

There is a XAML animation for a custom textbox: <EventTrigger RoutedEvent="MouseDown"> <EventTri ... тут анимация </DataTrigger> </EventTrigger> </Border.Triggers>` But he swears

Changing the image when the button is clicked. There are many buttons

Please tell me how you can implement a large number of buttons with the same two changing images so that you do not write a p ... nd. After all, it will be inconvenient to write 100 properties, 100 commands, and 100 bindings in the markup for 100 buttons.

C# YouTube Downloader

I write a video downloader from YouTube on lib VideoLibrary. The interface has a progress bar and two buttons + another input ... yte[] bytesvideo = video.GetBytes(); File.WriteAllBytes(result + video.FullName, bytesvideo); } } }

How do I get its text when selecting a value in ComboBox?

How do I get its text when selecting a value in ComboBox? SelectedValue, Selecteditem does not help. And how do I add multiple values to a ComboBox without adding the same ones?

How do I save data in a WPF application?

1) How does saving in a WPF app work? i.e. what happens when I restart the app? Does everything start from zero, or does the ... everything starts from scratch. Is this normal, or am I doing something wrong? Maybe I have something wrong with the code?

Wpf: binding data from an object

There is a separate class Piple with a bunch of data about a person, I create an object of this class in MainWinow. In the ma ... a from chel.name and chel.name2 to the corresponding textbox, respectively. Can you tell me if this can be done with Binding?

Button ContextMenu Styling in wpf

I'm trying to assign a style to ContextMenu to make it look like the Discord interface In general, I am surprised by the whi ... t; </Setter.Value> </Setter> And this is it: What to do with the edges?

How do I specify the "Color" type?" in XAML WPF?

People, I need to specify a class in TargetType, not Color, but Color?. That is, a color that can have the value Null. Specify TargetType="Color" I can, but I can't specify TargetType="Color?". Can you tell me how to do this?

How can I use ComboBox (WPF) to allow copying text from it to the clipboard?

There is a ComboBox described like this: <ComboBox ItemsSource="{Binding DatabaseItems}" SelectedItem="{Bindi ... ing an item from the list. How to achieve this effect while maintaining the ban on manual text input in the ComboBox? Thanks!

Working with two Wpf MVVM monitors

You can tell me, here I have 2 monitors and I need to move the WPF window to another monitor by clicking the button and retur ... s = screen.Bounds; mWindow.Left = bounds.Left + mWindow.Left; mWindow.Top = bounds.Top + mWindow.Top; }

Creating a graphic editor on WPF

Is it possible, using WPF technology, to create a full-fledged graphic editor in C# with saving images and animations? In what format can I save the animation?

Using gif animation in WPF

Tell me, how can I implement the display of gif animation in wfp?

How do I draw an ellipse based on the coordinates on the Image?

There is a class that allows you to draw an ellipse at the x, y coordinates on the canvas. How can I draw the same ellipse on ... ftProperty, (double)x); circle.SetValue(Canvas.TopProperty, (double)y); } } draw.circle(x, y, 10, 10, cavRoot);

How to delete a row from a DataGrid and delete it from a SQL database

At the expense of questions similar to StackOverflow. They are indeed similar, but there is no exact answer to the question, ... 40"/> </Grid> How do I implement deletion when clicking on the "Delete" button using the SelectionChanged event