Overwrite record after Search -MVVM WPF

I have a View ConfigRole which contains DataGrid with two Columns: View and IsEnabled(CheckBox), and a Search area. and the Button Save it works correctly, I make all views which I want IsEnabled and I save it : for exemple: And when I use the se...
more »

2017-06-16 11:06 (1) Answers

C# WPF: Changing PlacementTarget of a ToolTip

I'm trying to change the PlacementTarget of a ToolTip to a window further up the visual tree in order to have custom ToolTip clipping effects in that window. I've hooked everything up except for the PlacementTarget. Here's an example from XAML and i...
more »

2017-06-16 08:06 (1) Answers

Converting WebClient to HttpClient

I have been surfing and working on this for hours now and I'm read to throw my PC. I have a WebClient on WPF application that needs to be converted to HttpClient for UWP application. I am getting a lot of header errors and since I'm not a web gur...
more »

2017-06-16 04:06 (1) Answers

Selecting a row in DataGrid by clicking Row

I have a DataGrid that i am trying to change the selected item by selecting the row and not the cell. As you can see from the image below when i click outside the cell the item doesn't update. <DataGrid x:Name="customerListBox" SelectedItem="{B...
more »

2017-06-15 12:06 (2) Answers

datagrid default sort and get value

In my WPF project, I have a datagrid which looks like: <DataGrid x:Name="dgConfig" BorderThickness="5" AutoGenerateColumns="False" Margin="10,10,10,15" ItemsSource="{Binding ModulesView, Mode=TwoWay}" FontSize="14" Background="White"> &l...
more »

2017-06-15 11:06 (1) Answers

WPF control extra pixels source

I have these simple wpf controls in this layout. My question where is the extra pixels coming from in the TextBox. It looks like the TextBox is not respecting the Width='Auto' property. I'm looking to make the Grid Column 0 width equal exactly to th...
more »

2017-06-14 16:06 (1) Answers

Using 2 different ViewModels in a Grid

Can you use 2 different ViewModels in a Grid? One ViewModel to fill a ComboBox and another ViewModel to get the selectedItem? Like this sample (not working): <Grid Grid.Row="4" DataContext="{Binding ViewModel1, Mode=OneWay, Source={Static...
more »

2017-06-14 12:06 (1) Answers

Get Textblock in WPF to update using MVVM

So I just started playing around with WPF using MVVM and encountered a problem. I want to create a simple program which takes a list of firstnames and surnames and puts together a random name. Everything works except that the name is not shown in th...
more »

2017-06-13 09:06 (1) Answers

Filtering DataView with RX

I am building a WPF application and I am stuck at the point when I need to filter a ListBox. I obviously have a textbox for the user to put the filter string in, and I am using RX to handle it. filterBox = Observable.FromEventPattern<TextChanged...
more »

2017-06-12 19:06 (0) Answers

How to fix VisualBrush lost line?

In WPF ,we can use VisualBrush do some thing like ppt's left side. But I see the VisualBrush may lost the line in Rectangle when I zoom the VisualBrush to a small size.Like the image: You can see VisualBrush lost the Bottom line. But what I want...
more »

2017-06-12 10:06 (1) Answers

POS Printer not detected by POS.NET

Recently bought a POS Printer (off-brand from China) and I'm want to write a little WPF application that will let me print some text and cut the thermal paper. I installed POS.NET hoping that it would work out the box but it doesn't seem that way (g...
more »

2017-06-11 22:06 (0) Answers

Windows Forms resized after loading WPF

I'm experiencing a strange behavior, one for which I currently do not have an explanation or a solution and I'm hoping someone knows something about this. So I have a simple Windows Forms application with a single button, which on button click will ...
more »

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