app.xaml

Caliburn Launch without App.xaml, but with bootstrapper

感情迁移 提交于 2021-02-19 03:36:21
问题 I have a WinForms project from which I want to open a WPF window from a WPF user control project. But when I create an instance of the WPF window and call Show(), the bootstrapper isn't loaded. In an Windows Application, it's located in the App.xaml, but an user control project doesn't have this. What can I do? Thanks! 回答1: The only thing accomplished by having the bootstrapper in App.xaml's resources is instantiation of the bootstrapper and keeping a reference so it isn't garbage-collected.

Overriding application wide style

我的梦境 提交于 2020-01-30 08:27:25
问题 I want to define a global style for textblock in the application but I also want to be able to override this default style. I always thought that the local override of style has more priority than the global one but it doesn't seems to be the case? In the following example, the Button with content "Test" will have a "Red" foreground when I expect it to be "Aqua". If I remove the global style in Application.Resources, than it will works. Did I'm missing something? App.xaml <Application x:Class

WPF Style can't work on multiple controls

末鹿安然 提交于 2020-01-16 13:15:10
问题 I am using wpf style on my controls so that i can use an style on multiple controls at once. It usually works. for example i made an saveButtonStyle and i apply it on every save button on my application. But it doesn't work on MenuItems. I made a style for my menuitems which contains an icon next to the items. This is one screen shot of it. You see the Datagrid has an ContextMenu and within it there is multiple menu items. in this case pay attention to Set Alarm. it has an icon. This Set

How to use a method in MainPage from app.xaml.cs with variable appbar pivot

試著忘記壹切 提交于 2020-01-15 03:30:09
问题 Im using a pivot control with a variable appbar. As I see, the appbar is linked to a resource in app.xaml.cs where you put the info of the buttons and methods of it. It looks like this: <shell:ApplicationBar x:Key="AppBar1" IsVisible="True" IsMenuEnabled="False"> <shell:ApplicationBarIconButton IconUri="/Images/iconos/appbar.places.png" Text="TEXT" Click="ApplicationBarIconButton_Click11" /> <shell:ApplicationBarIconButton IconUri="/Images/iconos/appbar.calendar.month.png" Text="TEXT" Click=

Each dictionary entry must have an associated key error message

守給你的承諾、 提交于 2019-12-25 04:08:20
问题 could someone please help me to solve this problem, I think I have coded right the key required. This is a Style application dictionary test with just one Button. There are two error messages: Each dictionary entry must have an associated key, and All objects added to an IDictionary must have a Key attribute or some other type of key associated with them. Line 13 Position 14, both for MainWIndow.xaml. There are no more code written by programmer in this project. This is the MainWindow.xaml

Each dictionary entry must have an associated key error message

孤街醉人 提交于 2019-12-25 04:08:12
问题 could someone please help me to solve this problem, I think I have coded right the key required. This is a Style application dictionary test with just one Button. There are two error messages: Each dictionary entry must have an associated key, and All objects added to an IDictionary must have a Key attribute or some other type of key associated with them. Line 13 Position 14, both for MainWIndow.xaml. There are no more code written by programmer in this project. This is the MainWindow.xaml

DataTemplate.DataTriggers not found?

别等时光非礼了梦想. 提交于 2019-12-25 01:58:58
问题 A pretty strange thing happens when trying to use DataTemplate.DataTriggers in my XAML for Windows 8 Metro app. In my App.xaml, I am defining template for my data. I'd like to use the DataTriggers, but when I type it my VS2012 editor, I get errors stating that The attachable property 'DataTriggers' was not found in type 'DataTemplate'. and The member "DataTriggers" is not recognized or is not accessible. A similar issue happens when I try to set the DataType property for DataTemplate: The

Why is my style in Generic.xaml not working?

我们两清 提交于 2019-12-21 21:31:36
问题 I'm cleaning up App.xaml and moved some styles into Generic.xaml. But then, these styles don't have any effect. Why? Is this correct thing to do to make App.xaml tidy? EDIT (to include some source code): The goal is to restyle WPF DataGrid to make the scrollbars run from top to bottom and from left to right (default style excludes row and column header). The style is working when I put it in App.xaml. Because it's a big chunk of code, I'd like to move it out of App.xaml into /Themes

Why is my style in Generic.xaml not working?

风格不统一 提交于 2019-12-21 21:25:52
问题 I'm cleaning up App.xaml and moved some styles into Generic.xaml. But then, these styles don't have any effect. Why? Is this correct thing to do to make App.xaml tidy? EDIT (to include some source code): The goal is to restyle WPF DataGrid to make the scrollbars run from top to bottom and from left to right (default style excludes row and column header). The style is working when I put it in App.xaml. Because it's a big chunk of code, I'd like to move it out of App.xaml into /Themes

Merged dictionaries in the App.xaml

点点圈 提交于 2019-12-20 03:16:50
问题 I have a bunch of Xaml vector icons inside a separated .xaml . I load them inside my window using this directive: <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/ScreenToGif;component/Themes/IconSet.xaml"></ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources> I have lots of windows, so I would like to simply put this code inside the App.xaml . I'm trying this: <Application.Resources>