数据绑定后椭圆不会更新. [英] Ellipse not updating after data binding.

查看:77
本文介绍了数据绑定后椭圆不会更新.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的XAML代码.我正在更改C#中Ellipse的位置,以响应一个按钮,然后假定它显示其新位置.但是未发生可能是因为数据绑定不起作用.  我被困在这上面,无法继续. 非常感谢您的帮助.

Here is my XAML code. I am changing the position of Ellipse in C# in response to a button after which it is suppose to show its new position. But not happening may be because databinding is not working.  I am stuck on this one and unable to proceed.  Any help is greatly appreciated.

画布 名称 =" MyCanvas". Grid.Row ="1" =" 200" =" 200" =左"

<CanvasName="MyCanvas"Grid.Row="1"Height="200"Width="200"HorizontalAlignment="Left">

矩形 高度 ="200" 宽度 =" 200" ="SkyBlue" />

<RectangleHeight="200"Width="200"Fill="SkyBlue" />

椭圆 名称 =" SunCircle" 宽度 =" 40" =" 40" =" white" =" 80" ="80"; />

<EllipseName="SunCircle"Width="40"Height="40"Fill="White"Canvas.Left="80"Canvas.Top="80" />

椭圆 名称 ="MoonCircle" 宽度 =" 35" =" 35" =" Black" =""{ 路径 =""{ 路径

<EllipseName="MoonCircle"Width="35"Height="35"Fill="Black"Canvas.Left="{BindingPath=p1}"Canvas.Top="{BindingPath=p2}">

Ellipse.DataContext >

local : Eclipses

<local:Eclipses/>

>

>

>

推荐答案

您好

Hi ksassociate,

根据您的代码,您的案件与WPF更相关,我将把您的案件移至WPF论坛以获得更好的支持.

Based on your code, your case more related to WPF, I will move your case to WPF forum for better support.

最诚挚的问候,

克里斯汀


这篇关于数据绑定后椭圆不会更新.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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