c# - Source Not Available in WPF window -


anyone please me fix problem. error is:

the invocation of constructor on type 'testws.mainwindow' matches specified binding constraints threw exception.' line number '6' , line position '9'.

also showing:

source information missing debug information module.

i viewed in disassembly window shows like:

01112de1 mov dword ptr [ebp-44h],eax     <window x:class="testws.mainwindow"         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:local="clr-namespace:testws"         mc:ignorable="d"          title="mainwindow" height="467" width="799" background="#ff617eb0">      <window.resources>         <datatemplate x:key="datatemplateitemdirect">             <stackpanel orientation="horizontal">                 <grid>                     <grid.columndefinitions>                         <columndefinition width="60" ></columndefinition>                         <columndefinition width="120"></columndefinition>                         <columndefinition width="60"></columndefinition>                     </grid.columndefinitions>                  <textblock text="{binding userid}" grid.column="0" width="50"/>                 <textblock text="{binding name}" grid.column="1" width="150"/>                 <image source="{binding picturestring}" grid.column="2" name="imagename" height="15" width="15" />                 </grid>             </stackpanel>         </datatemplate>     </window.resources>     <grid>          <dockpanel lastchildfill="true" >             <stackpanel orientation="horizontal" height="40" width="700" dockpanel.dock="top">                 <label name="lbaddress" height="30" width="60" content="address:" margin="10,0,0,0"></label>                 <textbox name="txtaddr" width="350" height="20" text="ws://localhost:52804/wshandler.ashx"></textbox>                 <button name="btconnect" height="20" width="80" content="connect" margin="10,0,0,0" click="btconnect_click"></button>                 <button name="btdisconnect" height="20" width="80" content="disconnect" margin="10,0,0,0" click="btdisconnect_click"></button>                <!--  <button name="btlogin" width="80" height="20" content="logout" margin="10,10,0,0" click="btlogin_click" verticalalignment="top"></button>  -->             </stackpanel>             <stackpanel orientation="vertical" verticalalignment="top"  dockpanel.dock="left">                 <label name="lbuser" height="auto" width="auto"  margin="5" foreground="black" fontweight="bold" fontfamily="cambria"/>                 <button x:name="btnchat"  width="100" height="30" content="chat" click="btnchat_click" />                 <button x:name="btnfiletransfer" width="100" height="30" content="file transfer" click="btnfiletransfer_click" />                 <button x:name="button3" width="100" height="30" content="notification" click="button3_click"/>                 <button x:name="button5" width="100" height="30" content="group create" click="button5_click"/>                 <button x:name="button6" width="100" height="30" content="gps msg" click="button6_click"/>                  <button x:name="button4" width="100" height="30" content="remove user" click="button4_click"/>                  <!--    <button x:name="button7" width="100" height="30" content="button" click="button7_click"/>  -->              <!--   <button x:name="button8" width="100" height="30" content="userlist" click="button8_click"/> -->              </stackpanel>             <dockpanel dockpanel.dock="right" width="270" >                 <stackpanel>                     <label x:name="label" content="group" height="30" dockpanel.dock="top"  />                     <!-- <listbox x:name="listbox" height="100" margin="5" dockpanel.dock="top" /> -->                     <!--   <datagrid x:name="grdgroup" width="250" height="120" verticalalignment="top" margin="5" autogeneratecolumns="false" selectionchanged="grdgroup_selectionchanged_1" isreadonly="true" selectedvaluepath ="groupid" >                         <datagrid.columns>                             <datagridtextcolumn header="group id"  binding="{binding groupid}"/>                             <datagridtextcolumn header="group name" binding="{binding groupname}"/>                             <datagridtextcolumn header="parentid" binding="{binding parentid}"/>                              <datagridtextcolumn header="group" binding="{binding subgrp}"/>                         </datagrid.columns>                     </datagrid> -->                      <listbox name="lbgrouplist" width="auto" height="130" margin="5" dockpanel.dock="right"   selectionchanged="lbgrouplist_selectionchanged" selectedvaluepath ="groupid" >                          <listbox.template>                             <controltemplate>                                 <scrollviewer>                                     <dockpanel lastchildfill="true" background="white">                                         <grid dockpanel.dock="top" background="cadetblue" >                                             <grid.columndefinitions>                                                 <columndefinition width="60" ></columndefinition>                                                 <columndefinition width="90"></columndefinition>                                                 <columndefinition width="90"></columndefinition>                                              </grid.columndefinitions>                                             <label grid.column="0" content="group id"></label>                                             <label grid.column="1" content="group name"></label>                                             <label grid.column="2" content="group"></label>                                          </grid>                                         <itemspresenter></itemspresenter>                                     </dockpanel>                                 </scrollviewer>                             </controltemplate>                         </listbox.template>                          <listbox.itemtemplate>                             <datatemplate >                                  <stackpanel orientation="horizontal" >                                     <grid>                                          <grid.columndefinitions>                                             <columndefinition width="60" ></columndefinition>                                             <columndefinition width="90"></columndefinition>                                             <columndefinition width="90"></columndefinition>                                          </grid.columndefinitions>                                            <textblock text="{binding groupid}"  grid.column="0"  verticalalignment="center" ></textblock>                                         <textblock text="{binding groupname}" grid.column="1"  verticalalignment="center" ></textblock>                                          <textblock text="{binding subgrp}" grid.column="2"  verticalalignment="center"/>                                     </grid>                                 </stackpanel>                             </datatemplate>                         </listbox.itemtemplate>                     </listbox>                      <label x:name="lbluser" content="user" height="30" dockpanel.dock="top"   />                      <listbox x:name="lstuserlist" height="130" margin="5,0,5,0" dockpanel.dock="right"   itemtemplate="{dynamicresource datatemplateitemdirect}"  selectionchanged="lstuserlist_selectionchanged_1" itemssource="{binding userdisplay}" issynchronizedwithcurrentitem="true"  horizontalalignment="stretch" verticalalignment="stretch" width="auto"  >                     <listbox.template>                         <controltemplate>                             <scrollviewer>                                 <dockpanel lastchildfill="true" background="white">                                     <grid dockpanel.dock="top" background="cadetblue" >                                         <grid.columndefinitions>                                             <columndefinition width="60" ></columndefinition>                                             <columndefinition width="130"></columndefinition>                                             <columndefinition width="60"></columndefinition>                                          </grid.columndefinitions>                                         <label grid.column="0" content="user id"></label>                                         <label grid.column="1" content="user name"></label>                                         <label grid.column="2" content="status"></label>                                      </grid>                                     <itemspresenter></itemspresenter>                                 </dockpanel>                             </scrollviewer>                         </controltemplate>                     </listbox.template>                     </listbox>                      <!--   <textbox name="txtrecivemessage" margin="0,0,5,0" verticalscrollbarvisibility="auto" textwrapping="wrap" isreadonly="true"  /> -->                     <!-- <listbox x:name="lstuser"  margin="5"/> -->                     <!--                     <datagrid x:name="grdusers"   height="121" margin="5" selectionchanged="grdusers_selectionchanged_1" autogeneratecolumns="false" isreadonly="true">                         <datagrid.columns>                              <datagridtextcolumn header="user id"  binding="{binding userid}"/>                             <datagridtextcolumn header="user name" binding="{binding username}"/>                             <datagridtextcolumn header="status" binding="{binding statusname}"/>                              <datagridtemplatecolumn header="delete">                             <datagridtemplatecolumn.celltemplate>                                 <datatemplate>                                     <button command="delete" content="remove" click="button_click_3"/>                                 </datatemplate>                             </datagridtemplatecolumn.celltemplate>                         </datagridtemplatecolumn>                          </datagrid.columns>                     </datagrid> -->                 </stackpanel>             </dockpanel>              <stackpanel x:name="stkusrcontainer" horizontalalignment="center" >                 <!-- <local:uctrllogin width="400" height="215" loaded="uctrllogin_loaded" />   -->             </stackpanel>         </dockpanel>       </grid>  </window> 

this may duplicate of here

they added app.config

<configuration> <startup uselegacyv2runtimeactivationpolicy="true" /> </configuration> 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -