TextBlock Attached Property Binding

I'm trying to do a Binding on a Property of my Textblockextension. I'm doing that in a CellTemplate but it always gives me that one Error which says: Binding is not possible for the Property "SetInteractiveText" of type "TextBlock". Binding can...
more »

2017-02-14 10:02 (1) Answers

Record audio from RTSP stream with LibVLC.NET

I'm developing WPF application, that plays video from RTSP stream and try to record it to a file at the same time. This is how it works: I created LibVLC.NET.MediaPlayer instance and bound an event handler, that processed images: _vlcPlayer = new ...
more »

2017-02-14 06:02 (0) Answers

WPF bolder than bold

I want to make a text more bold than bold so I tried other enum values for FontWeight, but all of them seem to yield the same result <StackPanel> <TextBlock Text="Test" FontWeight="Bold"/> <TextBlock Text="Test" FontWeight="Bl...
more »

2017-02-13 21:02 (1) Answers

Pre-load WPF DataGrid

My DataGrid(In a tab) has a lot of ColumnHeader and DataTrigger. Everything is good until I select the tab for the first time, whole application lag for 5 seconds. After that, there is no more lag. So I was wondering if I can pre-load DataGrid first...
more »

2017-02-13 17:02 (1) Answers

C# WPF BorderBrush won't set color

I have a borderbrush that won't actually change the color of the border. Here is my XAML for the combobox. Any ideas? <ComboBox IsEditable="True" IsReadOnly="False" Text="{Binding Model.Number}" ItemsSource="{Binding Item}" ...
more »

2017-02-13 14:02 (2) Answers

wpf - One ViewModel for dynamic Tabs

Is it possible to have one ViewModel for multiple dynamic Tabs? Meaning that, whenever I create a new tab, it should use the same instance of ViewModel so I can retrieve information and also prevent each Tab from sharing data/showing the same data. ...
more »

2017-02-12 19:02 (3) Answers

WPF Snake game following the mouse cursor

I am trying to create a simple snake game where the snake follows the mouse. My snake body have to be a polyline. And my problem is that when I move the mouse too fast or too slow the body of my snake is getting longer/shorter and I know that is happ...
more »

2017-02-11 12:02 (1) Answers

Trim a wav file

I'm trying to trim a file using the code from here public static void TrimWavFile(string inPath, string outPath, TimeSpan cutFromStart, TimeSpan cutFromEnd) { using (WaveFileReader reader = new WaveFileReader(inPath)) { using (Wave...
more »

2017-02-11 01:02 (2) Answers

Object initializer in XAML

How do XAML object initializers work with CLR properties? If I need to create a XAML equivalent of : public MainWindow() { InitializeComponent(); this.DataContext = new MainWindowViewModel(); } then it would be : <Window.DataContext&...
more »

2017-02-10 11:02 (2) Answers

Click on row in DataGrid does not select it

Black background - cell. Gray background - row. Blue background - selected row. If I click on row, it does not become selected. However, if I click on cell, row is selected correctly. <Window x:Class="Test021000.MainWindow" xmlns="http...
more »

2017-02-10 10:02 (2) Answers

WPF trouble getting TextBox focused

On mouse event I'm trying to create TextBox, add it to Grid, select all and focus keyboard. But can't get it working: private void timeCodeEdit(object sender, MouseEventArgs e) { Grid grid = (Grid) ((Label) sender).Parent; TextBox text = new...
more »

2017-02-10 07:02 (1) Answers

Change MouseLeave animation when Grid is clicked

In my WPF appliction, I have a partially visible grid at the bottom of the visible space. When you mouseover it, it slides up and everything in the grid is visible. When the mouse leaves the grid, it slides back down. There are Combo and TextBoxes in...
more »

2017-02-09 21:02 (1) Answers

Visual Studio Windows Emulator

I'm trying to emulate a high resolution screen for development purposes; however, from looking around, it looks like the VS emulator will only work with Store Apps / UWP. Is there a way to trick / configure VS into using the emulator for a WPF deskt...
more »

2017-02-09 18:02 (2) Answers

WPF Combobox isEditable bind entry to list

I have a combobox, I want the user to be able to enter their selection into the combobox. I have it set to editable which works but the user can enter any entry they want. Though say the list contains Dog, Cat, Bird. The user can enter Snaked instead...
more »

2017-02-09 16:02 (2) Answers