• Revit 二次开发 WPF 用户动态传值


    右键新建项WPF

    修改为Window

    编写代码

    <Window x:Class="StudentRevit.AdjustPepe"
                 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" 
                 xmlns:local="clr-namespace:StudentRevit"
                 mc:Ignorable="d" Height="300" Width="400">
        <Grid>
            <!-- 定义grid 的行-->
            <Grid.RowDefinitions>
                <!--grid的行数,RowDefinition代表行的个数-->
                <RowDefinition Height="2*"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <!-- 定义grid 的列 -->
            <!--<Grid.ColumnDefinitions>
                --><!-- grid的列数,ColumnDefinition代表列的个数 --><!--
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>-->
            <StackPanel Grid.Row="0" Orientation="Horizontal">
                <TextBlock Text="风管宽" Width="70" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10" FontSize="20"></TextBlock>
                <TextBox x:Name="widthTextBox" Width="120" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10"></TextBox>
            </StackPanel>
            <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="80,0,80,0">
                <!--Grid.Row代表,Button在哪一行,从0开始算-->
                <Button Width="80" Height="30" Content="确认" Grid.Row="1" Margin="10"></Button>
                <Button Width="80" Height="30" Content="取消" Grid.Row="1" Margin="10"></Button>
            </StackPanel>
        </Grid>
    </Window>

    为按钮添加事件

    验证

  • 相关阅读:
    asp.net cache
    个人总结
    ORACLE 基础
    Test
    安装 SQL Server 2008,不断要求重启电脑,解决办法
    RedGate SQL Toolbelt sqlserver
    Windows下mysql忘记root密码的解决方法
    sql server 2008 评估期已过期解决办法
    查询并导出、导入mysql中的存储过程
    SQL Server 2008 安装提示“重新启动计算机失败”解决办法
  • 原文地址:https://www.cnblogs.com/chenyanbin/p/13303846.html
Copyright © 2020-2023  润新知