WPF尖角框的绘制

 

实例如下

 

 <Grid Grid.Column="1"
                      Visibility="{Binding VisibilityShortcut}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="15" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <Path Stroke="Black"
                              StrokeThickness="0"
                              Fill="{DynamicResource UcDrugDicShortcut.Container.Background}"
                              HorizontalAlignment="Left"
                              VerticalAlignment="Top"
                              Margin="0,0,0,0">
                            <Path.Data>
                                <PathGeometry Figures="
                                      M 95,15 
                                      L 95,15 95,15 
                                      L 110,0 110,15     
                                      Z" />
                            </Path.Data>
                        </Path>
                    </Grid>

                    <Grid Grid.Row="1">
                        <Border Background="{DynamicResource UcDrugDicShortcut.Container.Background}"
                                Height="Auto"
                                VerticalAlignment="Top"
                                CornerRadius="12">
                            <WrapPanel Name="wpnlTest"
                                       Background="Transparent"
                                       Height="Auto"
                                       Margin="12">
                                <ItemsControl ItemsSource="{Binding Models}"
                                              ItemTemplate="{StaticResource ButtonItemTemplate}">
                                    <ItemsControl.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <WrapPanel Orientation="Horizontal" />
                                        </ItemsPanelTemplate>
                                    </ItemsControl.ItemsPanel>
                                </ItemsControl>


                            </WrapPanel>
                        </Border>
                    </Grid>

                </Grid>

 

posted @ 2019-03-28 20:21  <--青青子衿-->  阅读(484)  评论(0编辑  收藏  举报
// /**/ // 在页脚Html代码 引入 // function btn_donateClick() { var DivPopup = document.getElementById('Div_popup'); var DivMasklayer = document.getElementById('div_masklayer'); DivMasklayer.style.display = 'block'; DivPopup.style.display = 'block'; var h = Div_popup.clientHeight; with (Div_popup.style) { marginTop = -h / 2 + 'px'; } } function MasklayerClick() { var masklayer = document.getElementById('div_masklayer'); var divImg = document.getElementById("Div_popup"); masklayer.style.display = "none"; divImg.style.display = "none"; } setTimeout( function () { document.getElementById('div_masklayer').onclick = MasklayerClick; document.getElementById('btn_donate').onclick = btn_donateClick; var a_gzw = document.getElementById("guanzhuwo"); a_gzw.href = "javascript:void(0);"; $("#guanzhuwo").attr("onclick","follow('33513f9f-ba13-e011-ac81-842b2b196315');"); }, 900);