Windows Presentation Foundation, or WPF, is a subsystem for rendering user interfaces in Windows-based applications.
165,789
questions
0
votes
0
answers
11
views
Disable tooltip on a textbox when a INotifyDataErrorInfo validation fails
I have added a tooltip on a textbox and want to disable it on a failed validation of the content of the textbox
View.xaml
<TextBox Grid.Row="2"
Grid.Column="...
0
votes
0
answers
10
views
XAML - Have button size fit to grid instead of width of text
I am using a button style in a UserControl. Whenever I use HorizontalAlignment, HorizontalContentAlignment, or Padding the width of the button will auto submit its width to the width of the text ...
0
votes
0
answers
14
views
WPF show all opened pages in frame using ItemsControl
I'm creating application that has two buttons and a frame. When you press the first button, Page1 is displaying in the frame using:
Page1 pg1 = new Page1();
frame1.NavigationService.Navigate(pg1);
...
1
vote
0
answers
8
views
Cannot create an instance of UserControl in design view, works in Release mode and at runtime
I have a user control LoadingIndicatorControl which is displayed in various other controls when loading is happened.
This user control is very simple and looks like this:
<StackPanel ...
0
votes
0
answers
19
views
WPF RenderTargetBitmap returns a black image
I have to "export" a UserControl as an image, I've tried to use RenderTargetBitmap, but this outputs a black image. I tried online solution, but I seem to be missing something.
Here is my ...
-2
votes
0
answers
19
views
VS2022 - WPF UI not updating when XAML is changed
I've never had this problem in the past; however, after upgrading to Visual Studio 2022 my UI updates inconsistently and more often not at all. I find that the only method to ensure an update is ...
-2
votes
1
answer
24
views
Undocking a control in WPF
I can currently dock a child control using the following line quite easily:
DockPanel.SetDock(group, Dock.Top);
(or any of the other three choices)
The problem I have is this: I'm trying to provide ...
0
votes
0
answers
24
views
C# WPF Image on Button cut off
I Created a style for my Buttons:
<Style TargetType="Button">
<Setter Property="Height" Value="20"></Setter>
<Setter Property="Width&...
0
votes
1
answer
16
views
Why does the ToolBar Command "ToggleBold" has no function in an Regular TextBox?
So Ive got an ToolBar and wanted to Bold my Text, with an RichTextBox its working but not with an normal regular TextBox. Could someone tell me why only RichTextBox is working and not the normal one? ...
0
votes
0
answers
30
views
c# WPF MVVM Set View Property From ViewModel
I want to create a simple Control to enter Text.
For this Control i want to create a Property.
This Property should be bind to the ViewModel.
I Created a Model for an Folder:
public class FolderModel :...
-1
votes
0
answers
17
views
Wpf data binding to two views?
I have aview model that is bound to datagrid and text boxes. The text boxes are for editing and the datagrid for display. Both controls are bound to a single view model. The view model extracts data ...
-1
votes
2
answers
23
views
Create WPF TreeView from array
I am struggling with this and hope someone can help me solving.
I have an array of string that are directories. This is an example of my array:
c:\temp\freigabe
c:\temp\ftptest
c:\temp\ftptest\testen
...
0
votes
1
answer
23
views
X:Static doesn't work in TextBlock. (WPF)
I just started learning WPF, and a problem arose. X:Static does not display the value from the .resx file, just writes the line itself. There are no errors in the console.
<TextBlock ...
0
votes
0
answers
21
views
How can I make an Placeholder/Watermark to my Richtextbox Element?
For an Placeholder/Watermark in an TextBox I use this Style get that to work:
<Style x:Key="placeHolder" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type ...
0
votes
1
answer
29
views
How can I increase the FontSize of a text with an ComboBox, but just the selected part of the Text?
So Ive got an RichTextbox in which I write Text, that Text I want to increase with the Selected FontSize from an ComboBox. So Far Ive got this:
viewModel:
public class ViewModel : ...