wpf - Is it possibly to get Frame.Content from Uri? -
i'm trying load xaml file inkscape https://inkscape.org/ frame.
frame1.source = new uri("name.xaml", urikind.relativeorabsolute);
it works fine. how can frame1.content
after ?
<?xml version="1.0" encoding="utf-8"?> <!--this file not compatible silverlight--> <viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" stretch="uniform"> <canvas name="svg2" width="744.09448819" height="1052.3622047"> <canvas.rendertransform> <translatetransform x="0" y="0"/> </canvas.rendertransform> <canvas.resources/> <canvas name="layer1"> <rectangle xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" canvas.left="137.14285" canvas.top="169.50507" width="182.85715" height="320" name="rect3336" fill="#ff0000ff" strokethickness="1" stroke="#ff000000" strokelinejoin="miter" strokestartlinecap="flat" strokeendlinecap="flat"/> </canvas> </canvas> </viewbox>
you can handle contentrendered
event of frame
. gives chance rendered usercontrol
, take controls through casting. example:
private void frame1_contentrendered(object sender, eventargs e) { var yourxaml = frame1.content page; // name.xaml }
Comments
Post a Comment