WPF text Wrap vs WrapWithOverflow
What’s the “conceptual” difference between TextWrapping=”Wrap” and TextWrapping=”WrapWithOverflow” (e.g. for a TextBox)? In the MSDN page about the class TextBox there is nothing … Thank you. 3 Answers 3
What’s the “conceptual” difference between TextWrapping=”Wrap” and TextWrapping=”WrapWithOverflow” (e.g. for a TextBox)? In the MSDN page about the class TextBox there is nothing … Thank you. 3 Answers 3
I am just coming up to speed on WPF and would like to create a reusable WPF control. When I look at the options for creating projects in Visual Studio, I see “WPF User Control Library” and “WPF Custom Control Library”. It’s unclear to me what the difference is between them and my Google searches … Read more
I’m having a hard time binding a simple static string property to a TextBox. Here’s the class with the static property: public class VersionManager { private static string filterString; public static string FilterString { get { return filterString; } set { filterString = value; } } } In my xaml, I just want to bind … Read more
I’m trying to show a tooltip regardless of a buttons state, but this does not seem to do the trick: <Button Command=”{Binding Path=CommandExecuteAction}” ToolTip=”{Binding Path=Description}” ToolTipService.ShowOnDisabled=”true” Style=”{StaticResource toolbarButton}”> <Image Source=”{Binding Path=Icon}”></Image> </Button> How can i show the tooltip when the button is disabled due to command.CanExecute returning false? Note: ToolTipService.ShowOnDisabled=”true” works like a charm. The … Read more
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more
When I debug my application in Microsoft Visual Studio 2015 Update 2, and I open a custom wpf dialog I get some extra debugging options in a black square. See image blow. How do I disable that? This first icon says “Go To Live Visual Tree”. The second icon says “Enable Selection”. The third icon … Read more
It seems that when a WPF application starts, nothing has focus. This is really weird. Every other framework I’ve used does just what you’d expect: puts initial focus on the first control in the tab order. But I’ve confirmed that it’s WPF, not just my app — if I create a new Window, and just … Read more
I am using http://www.codeproject.com/KB/IP/Facebook_API.aspx I am trying to call the XAML which is created using WPF. But it gives me an error: The calling thread must be STA, because many UI components require this. I don’t know what to do. I am trying to do this: FacebookApplication.FacebookFriendsList ffl = new FacebookFriendsList(); But it is giving … Read more
I bind my datagrid using //fill datagrid public DataTable GameData { get { DataSet ds = new DataSet(); FileStream fs = new FileStream(IMDB.WebPage.Class.Config.XMLPath, FileMode.Open, FileAccess.Read); StreamReader reader = new StreamReader(fs, Encoding.Default); ds.ReadXml(reader); fs.Close(); DataTable temp = ds.Tables[0]; return ds.Tables[0]; } } For some reason I get an empty row at the bottom. And sometimes after … Read more
I have the following XAML below for the main window in my WPF application, I am trying to set the design time d:DataContext below, which I can successfully do for all my various UserControls, but it gives me this error when I try to do it on the window… Error 1 The property ‘DataContext’ must … Read more