Powershell XAML problem I can't resolve


hi,

i have powershell script uses xaml (that build in visual studio). monitoring script several servers, location based.
when run it, there map showing locations , next list servers, script runs series of checks , updates visually on monitor.

this script working flawless no problems, want add arrow lines locations connected arrow de central datacenter location.

i'm not going post complete script here, because long , there company private information in it.

xaml part running in separate runspace script can keep running in loop , updating gui.

in short script working until add following code draw arrow (inside xaml part):

<ed:linearrow x:name="cpop01" margin="252,431,0,421" grid.row="1" startcorner="bottomright" strokethickness="4" arrowsize="3" bendamount="-0.8" endarrow="noarrow" opacity="0.8" stroke="#ff11d611" horizontalalignment="left" width="7">             <ed:linearrow.effect>                 <dropshadoweffect blurradius="10" renderingbias="performance" shadowdepth="10" direction="315"/>             </ed:linearrow.effect> </ed:linearrow>

i tried load ton of assemblies:

add-type -assemblyname presentationcore add-type -assemblyname presentationframework add-type -assemblyname system.drawing add-type -assemblyname windowsbase add-type -assemblyname system.windows.forms

my xml starts with

[xml]$xaml = @' <window  	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 	xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"


the error is:

you cannot call method on null-valued expression.

this error generated on lines containing (outside xaml code):

$synchash.xxxxx = $synchash.window.findname("xxxxx")

where xxxxx variables , names in xaml

i can't find information on internet issue! have knowledge of powershell xaml , drawing on top of image arrows?

this part of generated screen names removed. have idea about.









you missing assembly services new namespace.

you need install , load silverlight sdk , add reference sdk dll , not work in powershell.  load in vs first see how use it.

'c:\program files (x86)\microsoft sdks\expression\blend\silverlight\v5.0\libraries\microsoft.expression.drawing.dll'


\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file