wpf-controls

WPF C# - How do I avoid grouping taskbar icons?

核能气质少年 提交于 2021-02-19 15:26:02
问题 When I create a new window using .Show() , it shows the new window, however my icons are grouped like below: I don't want that. I want the icons to be separate because I want my users to easily open the window that they want instead of having to click it, view the list of open windows, then choosing which one they want every time. I don't want to use .ShowDialog() because I need the users to be able to focus on either window no matter the state of the other. Meaning, both windows will need to

WPF C# - How do I avoid grouping taskbar icons?

倾然丶 夕夏残阳落幕 提交于 2021-02-19 15:23:12
问题 When I create a new window using .Show() , it shows the new window, however my icons are grouped like below: I don't want that. I want the icons to be separate because I want my users to easily open the window that they want instead of having to click it, view the list of open windows, then choosing which one they want every time. I don't want to use .ShowDialog() because I need the users to be able to focus on either window no matter the state of the other. Meaning, both windows will need to

WPF - ScrollView Confusion

孤人 提交于 2021-02-19 02:36:33
问题 I am new to WPF and the ScrollViewer is frustrating me. Either I just don't "get" it, or it is a limited control. Here are my Frustrations: Bad Horizontal Scrolling The horizontal scroll bar is only visible at the bottom of the list (I have to scroll to the bottom to see it) Bad Borders I have a ListBox in my ScrollViewer. When I start the bottom of the list has no border and when I scroll down, the top border (line) of the list box disappears. I can kind of understand this, but attempts to

Control WPF progress bar from WinForms app

不打扰是莪最后的温柔 提交于 2021-02-11 15:46:48
问题 I have an WinForms app built with vb .net to which I've added a WPF user control. The WPF user control consists of only a progressbar. I can drag the WPF control from the toolbax and add it to the Main Form in WinForms vb .net. But I don't know how to let my WinForms app dynamically set the value for the WPF progress bar. Anyway I can dynamically set the WPF control progress bar's value from my WinForms app? Note: The reason Im using WPF progress bar instead of using WinForms progress bar is

Displaying dates as holiday in WPF Calendar

本小妞迷上赌 提交于 2021-02-10 22:26:32
问题 I'm using WPF Calendar control to add Holidays. User can select days and the selected days will be inserted to a database table as holiday. After the insertion, I'm displaying the days in Holiday table as BlackoutDates in the calendar as in the following code. XAML <Calendar x:Name="HolidayCalendar" SelectedDatesChanged="Calendar_SelectionChanged" SelectionMode="MultipleRange" Loaded="Calendar_Loaded"> C# DateTime now = DateTime.Now; var startDate = new DateTime(now.Year, now.Month, 1); var

WPF: Hydrate Canvas with Draggable Controls at Runtime

做~自己de王妃 提交于 2021-02-08 11:02:11
问题 This is what I'm trying to accomplish: I want to have a canvas that supports dragging and dropping arbitrary data in the style of Microsoft Visio. I've found this link that does that: http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx However, I also want to hydrate the canvas at run-time. I found this post: https://stackoverflow.com/questions/889825/wpf-is-it-possible-to-bind-a-canvass-children-property-in-xaml One of the solutions suggests drawing each item on it's own Canvas,

WPF: Hydrate Canvas with Draggable Controls at Runtime

烂漫一生 提交于 2021-02-08 11:01:08
问题 This is what I'm trying to accomplish: I want to have a canvas that supports dragging and dropping arbitrary data in the style of Microsoft Visio. I've found this link that does that: http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx However, I also want to hydrate the canvas at run-time. I found this post: https://stackoverflow.com/questions/889825/wpf-is-it-possible-to-bind-a-canvass-children-property-in-xaml One of the solutions suggests drawing each item on it's own Canvas,

Adding a Click event handler programmatically to a radio button

风格不统一 提交于 2021-02-07 09:21:55
问题 I know for a button, I can do this: this.button1.Click += new System.EventHandler(this.button_Click); But how can I do it for a radio button? 回答1: How about: radioButton1.Click += new RoutedEventHandler(radioButton1_Click); private void radioButton1_Click(object sender, RoutedEventArgs e) { } 回答2: this.button1.Checked += ... this.button1.Unchecked += ... 来源: https://stackoverflow.com/questions/4780193/adding-a-click-event-handler-programmatically-to-a-radio-button

undo/redo command stack for InkCanvas

人盡茶涼 提交于 2021-02-07 04:01:40
问题 I am creating paint like application using InkCanvas , I am willing to implement Undo and Redo functionality in my application . Which is the best way to implement Undo / Redo for InkCanvas ?? 回答1: I've implemented undo / redo for a WPF application and ended up publishing my undo / redo code to http://muf.codeplex.com/. You can also get it via NuGet. Just look for "MUF" or "Monitored Undo Framework". It includes support for Silverlight 4.0, as well as .NET 3.5, 4.0, and WP7. In my WPF app, we

undo/redo command stack for InkCanvas

眉间皱痕 提交于 2021-02-07 04:01:08
问题 I am creating paint like application using InkCanvas , I am willing to implement Undo and Redo functionality in my application . Which is the best way to implement Undo / Redo for InkCanvas ?? 回答1: I've implemented undo / redo for a WPF application and ended up publishing my undo / redo code to http://muf.codeplex.com/. You can also get it via NuGet. Just look for "MUF" or "Monitored Undo Framework". It includes support for Silverlight 4.0, as well as .NET 3.5, 4.0, and WP7. In my WPF app, we