有没有人有关于如何将Caliburn Micro与ModernUi(https://mui.codeplex.com)一起使用的示例或教程?
所以我想学名叫ModernUIDemo.exe一个示例应用程序zip文件中找到这里.该网站提到该应用程序的源代码可以在这里找到.
下载后,将Visual Studio Express 2013 for Windows桌面指向解决方案文件并尝试启动而不进行调试,我收到一条错误消息:
无法直接启动具有类库的输出类型的项目.
要调试此项目,请将可执行项目添加到此解决方案,该项目引用库项目.将可执行项目设置为启动项目.
我假设这意味着有多个项目,我需要设置一个可启动的项目.那我该怎么做?
我一直在查看应用程序设置,它列出了"启动对象",它显示了FirstFloor.ModernUI.App.App.这不对吗?
通常,C#应用程序中的文档是如何布局的?有没有像我必须为C#/ XAML/WPF生成的javadoc?
编辑:
我现在在XAML中得到一些引用错误,<mui:ModernTab并且<mui:BBCodeBlock在XML命名空间中不存在.有线索吗?我已经想过我添加了dll文件....
我为我的项目创建了一个手风琴。但我希望仅在单击展开图标时才展开面板。目前,它正在通过单击面板上的任意位置进行扩展。我们可以定制它的扩展行为吗?
代码:
import React from "react";
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
import Accordion from "@material-ui/core/Accordion";
import AccordionDetails from "@material-ui/core/AccordionDetails";
import Typography from "@material-ui/core/Typography";
import AccordionSummary from "@material-ui/core/AccordionSummary";
export default function App() {
return (
<div style={{}}>
<h4>How to create Accordion in ReactJS?</h4>
<Accordion style={{ width: 400}}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content"
>
<div>Click to Expand</div>
</AccordionSummary>
<AccordionDetails>
<Typography>Greetings of the day :)</Typography>
</AccordionDetails>
</Accordion>
</div>
);
}
Run Code Online (Sandbox Code Playgroud) 在我们公司,我们习惯使用WinForms开发应用程序,现在我们决定使用Caliburn.Micro和Modern UI切换到WPF-MVVM.我们想要达到的目标是拥有一个小应用程序: - 1个现代窗口 - 现代窗口内的2个页面的目标是在该页面内有一个按钮,用于将现代窗口导航到带参数的第二个页面.
我一直在努力了解如何解决这个问题,我成功地使用了Window(没有MUI),但是当谈到MUI时,它并没有真正给我我想要的结果.
到目前为止,我所做的一切都是
将App.xaml更改为
<Application x:Class="MuiWithCaliburn01.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MuiWithCaliburn01">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<local:AppBootstrapper x:Key="bootstrapper" />
<local:ModernContentLoader x:Key="ModernContentLoader" />
</ResourceDictionary>
<ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" />
<ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.Light.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Run Code Online (Sandbox Code Playgroud)
创建Bootstrapper类
public class AppBootstrapper : BootstrapperBase
{
static AppBootstrapper()
{
}
public AppBootstrapper()
{
Initialize();
}
protected override void OnStartup(object sender, StartupEventArgs e)
{
DisplayRootViewFor();
}
}
Run Code Online (Sandbox Code Playgroud)创建ModernContentLoader类
public class ModernContentLoader : DefaultContentLoader
{
protected override object LoadContent(Uri uri)
{
var content = base.LoadContent(uri);
if …Run Code Online (Sandbox Code Playgroud)我想在不使用Media元素的情况下在Windows 8应用中播放音频.Media Element需要附加到每个页面的Visual Tree.由于我的应用程序中的所有页面都使用背景音频,因此我必须在App框架中附加MediaElement.整件事情很糟糕.如果有人可以在Windows 8应用程序中播放音频而没有这个Media元素没有意义,我将不胜感激.
我正在使用ModernUI.我有一个问题与按钮和链接.
我试图通过Button Click事件导航,我在"Home.xaml"中的代码如下所示
private void addGameButton_Click(object sender, RoutedEventArgs e)
{
BBCodeBlock bs = new BBCodeBlock();
try
{
bs.LinkNavigator.Navigate(new Uri("pack://application:/Pages/AddGame.xaml"), null);
}
catch (Exception error)
{
ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
}
}
Run Code Online (Sandbox Code Playgroud)
mui:链接在MainWindows.xaml中正常工作以进行导航.但我想通过Home.xaml页面中的Button导航到Home.xaml Page的AddGame.xaml.
我的文件结构如下,供参考.

所以请告诉我,我在哪里做错了?
我正在使用Modern UIWPF 创建一个项目。主菜单项似乎是小写的,这是我想更改的主题之一。有没有办法把它从我的项目的更改MainWindow.xaml或MainWindow.xaml.cs或任何其他文件?
我的菜单代码是:
<mui:LinkGroup DisplayName="Home" >
<mui:LinkGroup.Links>
<mui:Link DisplayName="Dashboard" Source="/Pages/home.xaml" />
</mui:LinkGroup.Links>
</mui:LinkGroup>
Run Code Online (Sandbox Code Playgroud)
仅供参考,我可以从主题的代码中更改它并构建一个新FirstFloor.ModernUI.dll文件并使用它。但这不是我想要的,如果我在使用 one 后无法覆盖它,它将无效.dll。一定有办法,我一定错过了。
更新 我有一个显示窗口的图像。

我没有问题,DASHBOARD但我想做的是更改home为大写,或者我如何编写xaml代码。
我正在调查ModernUI这些天,我修改我的代码有点问题.问题来自于TabControl.来自的样本MUI DOC如下:
<Grid Style="{StaticResource ContentRoot}">
<mui:ModernTab SelectedSource="/Content/LoremIpsum.xaml#1" Layout="List">
<mui:ModernTab.Links>
<mui:Link DisplayName="Lorem Ipsum 1" Source="/Content/LoremIpsum.xaml#1" />
<mui:Link DisplayName="Lorem Ipsum 2" Source="/Content/LoremIpsum.xaml#2" />
</mui:ModernTab.Links>
</mui:ModernTab>
</Grid>
Run Code Online (Sandbox Code Playgroud)
任何人都可以向我解释#1上面代码中的用法吗?
我是WPF的新手,我想为我的应用程序创建一个横向菜单.搜索我发现这张图片的想法:

我的想法是在图片中添加一个相反的按钮.当用户单击按钮时,它会展开按钮以显示子菜单选项.一次只能扩展一个菜单.我的第一个测试是使用列表框,内部使用每个按钮的扩展器,然后使用堆栈面板添加子菜单选项.它看起来像这样:

这是我的XAML:
<Window x:Class="InterfazOhmio.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" Background="Gray">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ListBox>
<ListBox.Resources>
<Style TargetType="{x:Type Expander}">
<Setter Property="IsExpanded"
Value="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"/>
</Style>
</ListBox.Resources>
<ListBox.Template>
<ControlTemplate TargetType="{x:Type ListBox}">
<ItemsPresenter/>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<ContentPresenter Content="{TemplateBinding Content}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<Expander Background="GreenYellow" Width="243" Header="Pedidos">
<StackPanel>
<RadioButton Margin="20,5,5,5" Content="Nuevo Pedido" GroupName="Two"/>
<RadioButton Margin="20,5,5,5" Content="Consultar Pedidos" GroupName="Two"/>
<RadioButton Margin="20,5,5,5" Content="Pedidos Pendientes" GroupName="Two"/>
</StackPanel>
</Expander>
<Expander Background="BurlyWood" Width="243" …Run Code Online (Sandbox Code Playgroud) 嗨我正在写一个有用户登录的WPF应用程序.我在这个应用程序中使用Modern UI.该应用程序具有以下LinkGroups:
<mui:ModernWindow.MenuLinkGroups>
<mui:LinkGroup DisplayName="Group 1">
<mui:LinkGroup.Links>
<mui:Link DisplayName="A" Source="/Pages/A.xaml" />
<mui:Link DisplayName="B" Source="/Pages/B.xaml" />
<mui:Link DisplayName="C" Source="/Pages/C.xaml" />
</mui:LinkGroup.Links>
</mui:LinkGroup>
<mui:LinkGroup DisplayName="Group 2">
<mui:LinkGroup.Links>
<mui:Link DisplayName="D" Source="/Pages/D.xaml" />
<mui:Link DisplayName="F" Source="/Pages/F.xaml" />
<mui:Link DisplayName="G" Source="/Pages/G.xaml" />
</mui:LinkGroup.Links>
</mui:LinkGroup>
</mui:ModernWindow.MenuLinkGroups>
Run Code Online (Sandbox Code Playgroud)
我想根据用户ID隐藏或禁用名为"Group 2"的链接组.有办法吗?