directui | 国内叫 directui 的一个 Bjarke Viksoe 写的 Windowless UI 库 , Fixed
kandi X-RAY | directui Summary
kandi X-RAY | directui Summary
directui
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of directui
directui Key Features
directui Examples and Code Snippets
Community Discussions
Trending Discussions on directui
QUESTION
I have a UWP Windows store app with a WinUI 2.0 tree view control. I load the sub directory structure in the treeview based on user selection of a folder.
The problem I am facing is that the application crashes when I select certain folders on my dev machine. It works fine for other folders. I can see the same crash with some of my app users in the windows store diagnostic data.
Here the call stack from my machine for the crash:
...ANSWER
Answered 2020-Jun-10 at 03:26I was able to figure out what I was doing wrong - posting it here so that it can help others.
I was allowing users to filter out items in the tree view using other controls in the form, and I had implemented it such a way that on a node, I generate the list of children of a node when the bound property was accessed.
This meant that I returned a new list of children each time the bound property was accessed, and the framework expects the list of children to be stable between immediate calls.
The solution was to cache the list of children of a node so that I only generate a new list when something actually changed.
QUESTION
I am using Visual Studio 2019 16.4.3, Microsoft.Windows.CppWinRT 2.0.200117.5, Windows 10 1809 Pro and targeting 10.0.17763.0.
I am trying to port a C++/CX app to C++ WinRT. I am using data binding of the ItemsSource
, SelectedIndex
and SelectedItem
properties of a combo box but I am running into issues.
For the ItemsSource
I am binding to a IObservableVector
. The property is implemented using IObservableVector
and initialized with single_threaded_observable_vector(std::vector({L"One", L"Two", L"Three"}))
When starting the application I am getting the following exception:
Exception thrown at 0x766B19B2 in BlankCppWinRT.exe: Microsoft C++ exception: winrt::hresult_no_interface at memory location 0x03AED210. occurred
Is this supposed to work? How do I data bind a ItemsSource
to a collection of strings? This works in C# and C++/CX. What is the equivalent in C++ WinRT?
When I remove the two way binding to SelectedIndex
the application starts and shows the three strings in the combo box, with an empty selected item. But when I try to set the selected index in code by myComboBox().SelectedIndex(0);
(in the constructor) I am getting the same exception. Whereas the same line works in the Loaded
handler of the page.
Details below.
Any ideas?
Call stack of exception:
...ANSWER
Answered 2020-Feb-12 at 06:14As a stopgap fix, you could go to the Windows.Foundation.Collections.h to override the IndexOf() method. When unbox_value fails, catch the hresult_no_interface exception and return false. For more details, you can refer to this thread.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install directui
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page