wpf-4.5

How to have an async connection to COM with a WPF interface?

半世苍凉 提交于 2019-12-12 03:26:33
问题 My previous question (SelectedIndex is unchanging in tabcontrol - Dispatcher issue) didn't get very far, and I suspect I was on the wrong track to begin with. There are 3 givens in my program: I have a main window which is WPF. I connect to a separate application (a different process) which implements a COM server which can be called on at various times to perform time-consuming calculations, the results of which I will display in my window. I do not want the main window to freeze while

How to improve performance of WPF Grid control (.NET 4.0/4.5)?

人走茶凉 提交于 2019-12-11 02:39:55
问题 Definition : Having 2D-array of string (about 10 columns, 1,600 rows, fixed length of 7-char) serving as a data source for WPF .NET 4.0 Grid control, the following code snippet has been used in order to populate the Grid with labels displaying values from array. Note : Grid was added to XAML and passed to the function PopulateGrid (see Listing 1.). The visual output is essentially a tabular data representation in read-only mode (no need for two-way binding). Problem : Performance is a key

WPF Custom Control: DependencyProperty never Set (on only 1 of many properties)

时间秒杀一切 提交于 2019-12-08 17:03:40
问题 I have made a custom control called AddressForm , which inherits from Control. The control is used to display the fields for an IAddress object. Originally I made this control in Silverlight, now I am trying to get it working in WPF .net 4.5 The control defines 9 different dependency properties, and all but one is working correctly. Naturally, the one that is not working is the Address object itself! The Control's Address property never receives a value. I put a break-point in the address's

Setting focus to UI control in WPF MVVM Way on Validation.HasError

夙愿已清 提交于 2019-12-08 11:17:00
问题 Problem: Validation.HasError automatically highlights the control that has Error via INotifyDataErrorInfo implementation. My problem is i need to set focus on that specific control when it has ERror. How do I do That? 回答1: I have gone through several articles in Stackoverflow and other sites and i finally wish to address this problem. <Style TargetType="TextBox" > <Setter Property="OverridesDefaultStyle" Value="false"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property=

Caliburn.Micro + MEF + Modern UI: IContent events

独自空忆成欢 提交于 2019-12-04 13:26:18
问题 I've started a project using Caliburn.Micro and Modern UI (https://mui.codeplex.com) and am having some difficulty getting the navigation events of IContent to fire on my view model. I've already got the two hooked up to work with each other with the following: CM Bootstrapper: public class CMBootstrapper : Bootstrapper<IShell> { private CompositionContainer container; private DirectoryCatalog catalog; public CMBootstrapper() { } protected override void Configure() { catalog = new

Window style with WPF Ribbon from Microsoft doesn't match Windows 8 style

女生的网名这么多〃 提交于 2019-11-30 08:24:43
I'm using the release Version of Windows 8 and Visual Studio 2012 to create a WPF application with a Ribbon control. I choose the ribbon control that comes with WPF in .Net Framework 4.5. My code to create the ribbon: <RibbonWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfExperiments" x:Class="WpfExperiments.MainWindow" Title="MainWindow" Height="350" Width="525" Icon="Test.ico"> <Ribbon> <Ribbon.ApplicationMenu> <RibbonApplicationMenu> <RibbonApplicationMenuItem Header="Item 1"><

Window style with WPF Ribbon from Microsoft doesn't match Windows 8 style

半腔热情 提交于 2019-11-29 11:08:14
问题 I'm using the release Version of Windows 8 and Visual Studio 2012 to create a WPF application with a Ribbon control. I choose the ribbon control that comes with WPF in .Net Framework 4.5. My code to create the ribbon: <RibbonWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfExperiments" x:Class="WpfExperiments.MainWindow" Title="MainWindow" Height="350" Width="525" Icon="Test.ico">