xaml

Binding doesn't work on DependencyObject created in XAML

纵然是瞬间 提交于 2021-02-08 20:37:57
问题 I'm trying to pass multiple CommandParameters in XAML with the use of a custom class. I have created a class called ValueCommandArgs that inherits from DependencyObject and has two DepencyProperties (lets call them Value1 and Value2 for this example). The button which is supposed to call a command and pass this object looks like this: <Button Command="{Binding ChangeValueCommand}" Content="Execute Command"> <Button.CommandParameter> <args:ValueCommandArgs Value1="{Binding TestValue1}" Value2=

Binding doesn't work on DependencyObject created in XAML

牧云@^-^@ 提交于 2021-02-08 20:37:15
问题 I'm trying to pass multiple CommandParameters in XAML with the use of a custom class. I have created a class called ValueCommandArgs that inherits from DependencyObject and has two DepencyProperties (lets call them Value1 and Value2 for this example). The button which is supposed to call a command and pass this object looks like this: <Button Command="{Binding ChangeValueCommand}" Content="Execute Command"> <Button.CommandParameter> <args:ValueCommandArgs Value1="{Binding TestValue1}" Value2=

Binding doesn't work on DependencyObject created in XAML

≡放荡痞女 提交于 2021-02-08 20:36:54
问题 I'm trying to pass multiple CommandParameters in XAML with the use of a custom class. I have created a class called ValueCommandArgs that inherits from DependencyObject and has two DepencyProperties (lets call them Value1 and Value2 for this example). The button which is supposed to call a command and pass this object looks like this: <Button Command="{Binding ChangeValueCommand}" Content="Execute Command"> <Button.CommandParameter> <args:ValueCommandArgs Value1="{Binding TestValue1}" Value2=

Binding doesn't work on DependencyObject created in XAML

偶尔善良 提交于 2021-02-08 20:33:24
问题 I'm trying to pass multiple CommandParameters in XAML with the use of a custom class. I have created a class called ValueCommandArgs that inherits from DependencyObject and has two DepencyProperties (lets call them Value1 and Value2 for this example). The button which is supposed to call a command and pass this object looks like this: <Button Command="{Binding ChangeValueCommand}" Content="Execute Command"> <Button.CommandParameter> <args:ValueCommandArgs Value1="{Binding TestValue1}" Value2=

Binding doesn't work on DependencyObject created in XAML

流过昼夜 提交于 2021-02-08 20:32:25
问题 I'm trying to pass multiple CommandParameters in XAML with the use of a custom class. I have created a class called ValueCommandArgs that inherits from DependencyObject and has two DepencyProperties (lets call them Value1 and Value2 for this example). The button which is supposed to call a command and pass this object looks like this: <Button Command="{Binding ChangeValueCommand}" Content="Execute Command"> <Button.CommandParameter> <args:ValueCommandArgs Value1="{Binding TestValue1}" Value2=

Get ListBox to resize with window, but not resize with content

旧巷老猫 提交于 2021-02-08 12:24:11
问题 There must be an elegant solution to this problem, but I can't find anything online. I have a grid that has one column and row with width/height *, containing a ListBox. I have my Window SizeToContents set to WidthAndHeight to allow the window to resize to the proper size for each set of UI widgets/fonts. When I add items to the ListBox, it resizes, causing the window to grow. I want the ListBox to resize if I change the size of the window, but if I add content that is longer than the width

Microsoft Store Engagement Services - Dev Center Push Notifications UWP C#

一世执手 提交于 2021-02-08 11:51:24
问题 Ok, I have a simple and silly question, maybe someone could clarify for me. In the instructions provided by Microsoft, they state "1.In your project, locate a section of code that runs during startup in which you can register your app to receive Dev Center notifications." Now, would this be in App.xaml.cs OR in MainPage.xaml.cs I did my work in App.xaml.cs (Correct Place) However, it is not working The instructions provided by Microsoft were vague. The example they provide also gives no hint

Microsoft Store Engagement Services - Dev Center Push Notifications UWP C#

若如初见. 提交于 2021-02-08 11:51:03
问题 Ok, I have a simple and silly question, maybe someone could clarify for me. In the instructions provided by Microsoft, they state "1.In your project, locate a section of code that runs during startup in which you can register your app to receive Dev Center notifications." Now, would this be in App.xaml.cs OR in MainPage.xaml.cs I did my work in App.xaml.cs (Correct Place) However, it is not working The instructions provided by Microsoft were vague. The example they provide also gives no hint

Exception thrown: 'System.InvalidOperationException' in WindowsBase.dll

北城以北 提交于 2021-02-08 10:33:57
问题 I'm having trouble having something update in my WPF UI. The same part of the code that's throwing the exception works just fine in the other function. Now, for some reason, I can't figure out it's not only throwing an exception, it is also not updating like I want it to. I want the UI elements in the OnCPUDetEvent() function to update based off of the timer I have set up. Here's my code: using System; using System.Collections.Generic; using System.Management.Instrumentation; using System

Exception thrown: 'System.InvalidOperationException' in WindowsBase.dll

本秂侑毒 提交于 2021-02-08 10:33:05
问题 I'm having trouble having something update in my WPF UI. The same part of the code that's throwing the exception works just fine in the other function. Now, for some reason, I can't figure out it's not only throwing an exception, it is also not updating like I want it to. I want the UI elements in the OnCPUDetEvent() function to update based off of the timer I have set up. Here's my code: using System; using System.Collections.Generic; using System.Management.Instrumentation; using System