# Error with previewer

**URL:** https://forum.alternet-ui.com/t/error-with-previewer/269
**Category:** AlterNET UI Support
**Created:** [January 3, 2023, 6:06am UTC](https://forum.alternet-ui.com/t/error-with-previewer/269 "2023-01-03T06:06:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![neoxeo](https://forum.alternet-ui.com/letter_avatar_proxy/v4/letter/n/606060/32.png) [@neoxeo](https://forum.alternet-ui.com/u/neoxeo)
#### Post date: [January 3, 2023, 6:06am UTC](https://forum.alternet-ui.com/t/error-with-previewer/269/1 "2023-01-03T06:06:43Z")

</div>

Hi,

I have an error with the previewer. Code works fine but have no preview available.

Here is the code :

```auto
<Window xmlns="http://schemas.alternetsoft.com/ui/2021"
        xmlns:x="http://schemas.alternetsoft.com/ui/2021/uixml"
        x:Class="Mig2AlternetUI.MainWindow"
        Title="Mig2AlternetUI"
		Width="400" Height="600">
	<StackPanel Orientation="Vertical" Padding="10" Grid.Column="0">
		<Label Text="C# Project Path :" />
		<TextBox Text="Enter Project path" Name="txtboxPath" Margin="0,0,50,0" TextChanged="txtboxPath_TextChanged" MouseLeftButtonDown="txtboxPath_Click"/>
		<Button Text="..." Name="btnPath" Margin="318,-23,0,0" Width="10" Click="btnPath_Click"/>
		<Button Text="Create Report" Name="btnReport" Click="btnReport_Click"/>
		<TextBox Text="" Name="txtboxDebug" Height="445" Multiline="True"/>
		<Label Text="" Name="lblResult" Margin="4"/>
		<Label Text="" Name="lblOutput" Margin="4,0,0,0"/>
	</StackPanel>
</Window>

Here is error : 

```

System.Xaml.XamlException: ‘Unable to find suitable setter or adder for property MouseLeftButtonDown of type Alternet.UI:Alternet.UI.UIElement for argument System.Private.CoreLib:System.String, available setter parameter lists are:  
Alternet.UI.MouseButtonEventHandler Line 8, position 111.  
at XamlX.Transform.Transformers.ConvertPropertyValuesToAssignmentsTransformer.\<\>c\_\_DisplayClass0\_3.g\_\_CreateAssignment|1(\<\>c\_\_DisplayClass0\_0& , \<\>c\_\_DisplayClass0\_1& , \<\>c\_\_DisplayClass0\_2& )  
at XamlX.Transform.Transformers.ConvertPropertyValuesToAssignmentsTransformer.Transform(AstTransformationContext context, IXamlAstNode node)  
at XamlX.Transform.AstTransformationContext.Visitor.Visit(IXamlAstNode node)  
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor) at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor) at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor) at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)  
at XamlX.Ast.XamlPropertyAssignmentNode.VisitChildren(IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor) at XamlX.Ast.XamlManipulationGroupNode.VisitChildren(IXamlAstVisitor visitor) at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor) at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor) at XamlX.Ast.XamlPropertyAssignmentNode.VisitChildren(IXamlAstVisitor visitor) at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor) at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)  
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)  
at XamlX.Compiler.XamlCompiler`2.Transform(XamlDocument doc, Boolean strict) at Alternet.UI.Markup.Xaml.XamlIl.CompilerExtensions.UixmlPortXamlIlCompiler.ParseAndCompile(String xaml, String baseUri, IFileSource fileSource, IXamlTypeBuilder`1 tb, IXamlType overrideRootType)  
at Alternet.UI.Markup.Xaml.XamlIl.UixmlPortXamlIlRuntimeCompiler.LoadSreCore(String xaml, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)  
at Alternet.UI.Markup.Xaml.XamlIl.UixmlPortXamlIlRuntimeCompiler.LoadSre(String xaml, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)  
at Alternet.UI.Markup.Xaml.XamlIl.UixmlPortXamlIlRuntimeCompiler.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)  
at Alternet.UI.Markup.Xaml.UixmlPortRuntimeXamlLoader.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri, Boolean designMode)  
at Alternet.UI.UixmlLoader.Load(Stream xamlStream, Assembly localAssembly)  
at Alternet.UI.Integration.UIXmlPreviewerService.LoadControlFromUixml(IDictionary`2 parameters) at Alternet.UI.Integration.UIXmlPreviewerService.ProcessUixmlUpdate(IDictionary`2 parameters)’ numéro de ligne ‘8’ et position de ligne ‘111’.

```auto

Error come from "MouseLeftButtonDown" semms to be not "understand" by previewer.

Thank you for your help.

NeoXeo
```

---

<div class="post-metadata">

### Author: ![neoxeo](https://forum.alternet-ui.com/letter_avatar_proxy/v4/letter/n/606060/32.png) [@neoxeo](https://forum.alternet-ui.com/u/neoxeo)
#### Post date: [January 4, 2023, 8:49pm UTC](https://forum.alternet-ui.com/t/error-with-previewer/269/2 "2023-01-04T20:49:49Z")

</div>

Hi,

Can you tell me if you reproduce this error and if you have a solution or an approximate date to correct this ?

Thanks.

NeoXeo

---

<div class="post-metadata">

### Author: ![dmitry.medvedev](https://forum.alternet-ui.com/user_avatar/forum.alternet-ui.com/dmitry.medvedev/32/27_2.png) [@dmitry.medvedev](https://forum.alternet-ui.com/u/dmitry.medvedev)
#### Post date: [January 7, 2023, 2:19am UTC](https://forum.alternet-ui.com/t/error-with-previewer/269/3 "2023-01-07T02:19:37Z")

</div>

Hi NeoXeo,

We reproduced this problem when editing this UIXML, and it seems to be related to the MouseLeftButtonDown event handler. If you define the event handler itself like this, the preview seems to work correctly. We will try to fix this issue very shortly.

```
    private void TxtboxPath_MouseLeftButtonDown(object sender, Alternet.UI.MouseButtonEventArgs e)
    {
        
    }

```

Kind regards,  
Dmitry

---

<div class="post-metadata">

### Author: ![neoxeo](https://forum.alternet-ui.com/letter_avatar_proxy/v4/letter/n/606060/32.png) [@neoxeo](https://forum.alternet-ui.com/u/neoxeo)
#### Post date: [January 13, 2023, 7:46pm UTC](https://forum.alternet-ui.com/t/error-with-previewer/269/4 "2023-01-13T19:46:28Z")

</div>

Hi Dmitry,

I have try this without success. I have opened an issue on github repository of Alternet-UI.

Regards,  
NeoXeo

---

<div class="post-metadata">

### Author: ![neoxeo](https://forum.alternet-ui.com/letter_avatar_proxy/v4/letter/n/606060/32.png) [@neoxeo](https://forum.alternet-ui.com/u/neoxeo)
#### Post date: [February 6, 2023, 5:47am UTC](https://forum.alternet-ui.com/t/error-with-previewer/269/5 "2023-02-06T05:47:12Z")

</div>

I have updated issue on AlterNet UI GitHub repository with version 0.9.153. Error still present and solution to declare event handler into code doesn’t work.  
Thank for your help.
