zoukankan      html  css  js  c++  java
  • WPF 主窗口调用UserControl

    1.新建一个UserControl1.xmal

    <UserControl x:Class="SurfaceApplication5.UserControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
    <Button Width="100" Height="80" Content="OK"></Button>
    </Grid>
    </UserControl>

    2.SurfaceWindow1.xaml中调用usercontrol1.xaml

    <s:SurfaceWindow x:Class="SurfaceApplication5.SurfaceWindow1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    Title="SurfaceApplication5"
    xmlns:local="clr-namespace:SurfaceApplication5">
    <Grid>
    <local:UserControl1 x:Name="user1"/>
    </Grid>
    </s:SurfaceWindow>

  • 相关阅读:
    有关TSQL中的ROUND()的用法
    孤立用户
    微小的边缘原理
    分段统计查询的方法
    虎尾兰
    有规律字段的拆分
    对索引视图的限制
    金额转换为英文大写
    经典名言
    最大信息熵原理
  • 原文地址:https://www.cnblogs.com/DeepBlues/p/2867530.html
Copyright © 2011-2022 走看看