使用C#在WPF中自定义弹出窗口的设计(telerik) [英] Custom design of a popup in wpf using c# (telerik )

查看:678
本文介绍了使用C#在WPF中自定义弹出窗口的设计(telerik)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在按钮单击事件中显示一个弹出窗口>我在该弹出窗口中保留了一个自定义用户控件,因此无论何时显示该弹出窗口,都会显示自定义用户控件.但是现在我需要修改该自定义控件. 弹出窗口中当前的自定义控件如下所示:

I am showing an pop up in a button click event> I have kept a custom user control inside that popup and so whenever the pop is being shown taht custom usercontrol will be displayed.But now i need to modify the custom control . Current custom control inside popup looks like below

但是我需要拐角处看起来像下面的图像.我需要在控件中有一个尖角,并且每当显示弹出窗口时都需要一个尖角

but i need the corner to be look like the below image.. How to do it.? I need that sharp corner in my control and i need that sharp corner point whenever the popup been shown

添加按钮的代码及其弹出窗口

bolow the code of the button and its popup

 <telerik:RadButton Name="btnH" Grid.Column="1" HorizontalAlignment="Left" Margin="444,56,0,0" Grid.Row="2" VerticalAlignment="Top" 
                 Width="23" Height="23" BorderThickness="6" BorderBrush="#4E4E4E" Click="btnH_Click" >
            <Image Source="Images/help.png" />
        </telerik:RadButton>
        <Popup PopupAnimation="Fade" Placement="Mouse" AllowsTransparency="True" StaysOpen="False" x:Name="TooltipPopup" >
            <Border Background="AntiqueWhite" CornerRadius="0" BorderThickness="1">
                <StackPanel Margin="1" Orientation="Horizontal" >
                    <local:UCToolTip></local:UCToolTip>
                </StackPanel>
            </Border>
        </Popup>

推荐答案

以下是XAML中的一个示例:

Here is an example in XAML:

<Grid Width="300" Height="200">
    <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Grid Background="Orange">
        <!--Your content here-->
    </Grid>
    <Polygon Grid.Row="1"
        Points="0,0 15,0, 0,30" Stroke="Orange" Fill="Orange" />
</Grid>

这篇关于使用C#在WPF中自定义弹出窗口的设计(telerik)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆