|
Hello,
I just downloaded Woodgrove Finance Application from this link[^]
I have VS 2008 Team System and am on Windows Xp. I extracted the application and opened it in VS 2008. But not working. I got some errors. When I take a look the details, the project is not able to find the assembly called WoodgroveFinanceHost.
xmlns:WoodgroveFinanceHost ="clr-namespace:WoodgroveFinanceHost;assembly=WoodgroveFinanceHost"
I have checked the assembly and I found that it's already there. Anyway, I tried to remove and re-add the WoodgroveFinanceHost project from WoodgroveFinanceApplication...
but not working. WoodgroveFinanceApplication is still not able to find the WoodgroveFinanceHost ..
Any idea?
Thanks in advance.
|
|
|
|
|
According to this article[^], I tried the following things too..
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:YourProjectNamespace"
But doesn't work..
|
|
|
|
|
I'm using the 3.5 sp1 beta, this is supposed to have better error messages and that seems to be the case:
Part URI cannot start with two forward slashes. Error at object 'PortfolioDataSource' in markup file 'WoodgroveFinanceHost;component/stockhost.xaml' Line 287 Position 74.
If you change it to pack://application:,,,/FinanceExplorer/Equity.xml it should work.
|
|
|
|
|
Insincere Dave wrote: If you change it to pack://application:,,,/FinanceExplorer/Equity.xml it should work.
Thank you very much, buddy.
I have checked the path in StockHost.xaml. I found the following code that seems correct.
<xmldataprovider x:key="PortfolioDataSource" d:isdatasource="True" source="pack://application:,,,//FinanceExplorer//Equity.xml">
I'm not sure whether you have VS 2008 or not. If you have, please try the following steps..
1) Download the application.
2) Extract it
3) Open it in VS 2008.
4) Go to Solution Explorer.
5) Double-click to open Page1.xaml. (You will get 2 errors at designtime)
6) Double-click StockHost.xaml.(You will get 11 errors at designtime)
If you close those files (e.g Page1.xaml or StockHost.xaml), those errors will be disappeared. Any idea why it's happening like that?
And, Like I said above, the path seems correct... Can you tell me how to change?
|
|
|
|
|
You need to change pack://application:,,,//FinanceExplorer//Equity.xml to pack://application:,,,/FinanceExplorer/Equity.xml
Notice the double slashes in the original.
I didn't get any errors, however the .NET 3.5 SP1 Beta did cause problems for the VS designer.
That single change in StockHost.xaml did allow me to compile and run the sample, it didn't work beforehand.
|
|
|
|
|
|
Hi All,
I'm using XP SP2, MSVS2008, Firefox verison 2.0 and IE6.
I created a C# WPFBrowserApplication and placed an image control in it with source given as "E:\WPF\WPFBrowserApplication2\images\imag.jpg".
When I run the application I'm getting exception :
XAMLParserException was unhandled: Cannot create instance of 'Page1' defined in assembly 'WpfBrowserApplication2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'Page1.xaml'.
The same exception occurs if do the code behind for image as below:
BitmapImage bmp = new BitmapImage();
bmp.BeginInit();
bmp.UriSource = new Uri("file://E:/WPF/WPFBrowserApplication2/images/img.jpg");
bmp.DecodePixelWidth = 200;
bmp.EndInit();
Image img = new Image();
img.Width = 200;
img.Source = bmp;
I'm getting the exception when bmp.EndInit() is executed.
In windows application, the image is loaded if image control is used.Otherwise there is no exception, but image is not loaded.
(I've written the code in function Page_Loaded/Window_Loaded)
How do I load image in WPFBrowserApplication and WPFApplication without using image control?
Thanks & Regards,
Sanju.
|
|
|
|
|
Hi friends,
Can u please help me , i am unable to access the textbox(which in silver light application) value in .aspx page.
can u please help me how to get textbox(which in silver light application) value
Regards
Kishore
|
|
|
|
|
Hi Kishore,
For this First u should have some html elements like hidden control in ur application.
After that In SilverLight Application use this code to set value to the hidden control.
pls add Windows.browser Assembly also.
HtmlElement.Document.GetElementById("Id").SetAttribute("value","nithya");
Anbudan Endrum
Nithya Raghu
ur's
nithya
|
|
|
|
|
Thank you very much nithya.
your help is appreciable. i will meet u in office and collect complete info
once again thanks
Regards
Kishore
|
|
|
|
|
NithyaR wrote: For this First u should have some html elements like hidden control in ur application
He can directly access the textbox by using HtmlElement.Document.GetElementById("Id"). No need to use Hidden Field.
|
|
|
|
|
We have a WPF app with about 400 users. One user, who has a high end machine ( 2 gig of RAM, good video card, etc ), reports that if he starts the app on boot, closes it and restarts it, it blows up. That is to say, at any point if he runs it a second time, it fails, even if he does it all right away. Here is the stack trace:
Not enough quota is available to process this command
at MS.Win32.UnsafeNativeMethods.PostMessage(HandleRef hwnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, List`1 channelList)
at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
We have our own logging in the app, I know for sure that the constructor for te MainWindow is completed, or in this code:
bool current = OvsUtility.GetInterfaceAnimalPanel().DualOverlaysOn;
singleOverlay.IsChecked = !current;
dualOverlay.IsChecked = current;
singleOverLay and dualOverlay are menu items, GetInterfaceAnimalPanel just returns an inner control from a user control.
We have no logging after this code, but we have logging the moment the Load event fires on the Main Window, and this code is not running, so the exception occurs in the above code, OR between the constructor and the Load event.
The only code that runs between these two, is a couple of window size changed events.
I assume it's something to do with his machine, as no-one else has the issue, but it's not low specced, so that's not it. Where do I look next ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian,
Did you ever figure this out?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Did you find the solution to this? We have the same problem here.
|
|
|
|
|
I know it's been quite a while, but I'm having a similar issue except mine occurs on any windows 7 machine (works fine on XP, Vista, Server 2008, etc and was working on Win 7 for a while), not sure of the cause...did you ever come up with a solution?
|
|
|
|
|
Hi,
i have windows xp. i downloaded silverlight2.0 tool kit for MS visual studio 2008 and instal it. but now the problem is that when i create C# silverlight2.0 application project
1st. it show message box "add silverlight application"
2nd. In the xaml file there is the following code
UserControl x:Class="SilverlightApplication10.Page"
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300"
Grid x:Name="LayoutRoot" Background="White"
Grid
UserControl
why it not showing canvas /canvas
how i can fix it
wasim khan
|
|
|
|
|
|
|
Hi,
i have windows xp. i downloaded silverlight2.0 tool kit for MS visual studio 2008 and instal it. but now the problem is that when i create C# silverlight2.0 application project
1st. it show message box "add silverlight application"
2nd. In the xaml file there is the following code
<usercontrol x:class="SilverlightApplication10.Page">
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<grid x:name="LayoutRoot" background="White">
why it not showing <canvas>
wasim khan
|
|
|
|
|
|
Iam binding the list view thro this code..
When i click the list the values appears in textbox ..How can i take the values
Public Sub bindlist()
Try
Dim olecon As New OleDb.OleDbConnection
Dim olecomd As New OleDb.OleDbCommand
Dim dtst As New DataSet
' Dim emp As New ListBox
Dim strsql As String
Dim adpt As OleDbDataAdapter
strsql = ("User ID=sa;password=nimda;Data Source=CANARY\SOCPOS;Tag with column collation when possible=False;Initial Catalog=pay;Use Procedure for Prepare=1;Auto Translate=True;Persist Security Info=False;Provider=SQLOLEDB.1;Workstation ID=CANARY;Use Encryption for Data=False;Packet Size=4096")
olecon.ConnectionString = strsql
olecon.Open()
olecomd.CommandText = "select * from ps_bank"
olecomd.Connection = olecon
adpt = New OleDb.OleDbDataAdapter(olecomd)
adpt.Fill(dtst)
Dim bind As New Binding
bind.Source = dtst.Tables(0)
ListColor.DataContext = dtst.Tables(0)
ListColor.SetBinding(ListView.ItemsSourceProperty, bind)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
XAML:::
<Grid>
<TextBox BorderThickness="0" Text="{Binding Path=psc_code}"></TextBox>
</Grid>
</DataTemplate>-->
<DataTemplate x:Key="cellTemplateName">
<Grid>
<TextBox Name="txtname" BorderThickness="0" Text="{Binding Path=psbk_bankname}" VerticalAlignment="Center" ></TextBox>
</Grid>
</DataTemplate>
<DataTemplate x:Key="cellTemplateRGB">
<Grid>
<TextBox Name="txtrgb" BorderThickness="0" Text="{Binding Path=psbk_address1}"></TextBox>
</Grid>
</DataTemplate>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="500" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListView Name="ListColor" Grid.Row="0" >
<ListView.View>
<GridView AllowsColumnReorder="true" ColumnHeaderToolTip="Color Information" >
<!-- <GridViewColumn CellTemplate="{StaticResource cellTemplateCode}" Header="Code" Width="100"/>-->
<GridViewColumn DisplayMemberBinding="{Binding Path=psbk_bankcode}" Header="Code" Width="100"/>
<GridViewColumn CellTemplate="{StaticResource cellTemplateName}" Header="Name" Width="100"/>
<GridViewColumn CellTemplate="{StaticResource cellTemplateRGB}" Header="Address" Width="100"/>
</GridView>
</ListView.View>
</ListView>
<StackPanel Margin="0,20,0,0" Background="White" HorizontalAlignment="Left" Grid.Row="1" >
<Button Name="btnsave" Width ="50" Height="30" >Save</Button>
</StackPanel >
</Grid>
|
|
|
|
|
Create a new WPF Application solution and paste the code into it.
Run the application in debug mode.
Edit the grid.
Press the button.
Look in the Visual Studio output window and you'll see your new edited data.
I'm using a class instead of a data row, but the concepts are still the same.
You can look at the data context in the button's click event and see how to find the data.
In you case, Me.ListColor.Items will be a collection of DataRows. Just access the cells in the DataRow
Karl
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="400">
<Window.Resources>
<DataTemplate x:Key="cellTemplateName">
<TextBox BorderThickness="0" Text="{Binding Path=BankName}" />
</DataTemplate>
<DataTemplate x:Key="cellTemplateAddress">
<TextBox BorderThickness="0" Text="{Binding Path=BankAddress}" />
</DataTemplate>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListView Name="ListColor" Grid.Row="0" ItemsSource="{Binding}" >
<ListView.View>
<GridView AllowsColumnReorder="true" >
<GridViewColumn DisplayMemberBinding="{Binding Path=BankCode}" Header="Code" Width="100"/>
<GridViewColumn CellTemplate="{StaticResource cellTemplateName}" Header="Name" Width="100"/>
<GridViewColumn CellTemplate="{StaticResource cellTemplateAddress}" Header="Address" Width="100"/>
</GridView>
</ListView.View>
</ListView>
<Button Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Click="btnsave_Click" Margin="0,20,0,0" Content="Save" />
</Grid>
</Window>
Class Window1
Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
Dim obj As New System.Collections.ObjectModel.ObservableCollection(Of CodeNameAddress)
obj.Add(New CodeNameAddress("hello address 1", "name 1", "5"))
obj.Add(New CodeNameAddress("hello address 2", "name 2", "25"))
obj.Add(New CodeNameAddress("hello address 3", "name 3", "95"))
Me.ListColor.DataContext = obj
End Sub
Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
For Each obj As CodeNameAddress In Me.ListColor.Items
Debug.WriteLine(obj.BankCode & " " & obj.BankName & " " & obj.BankAddress)
Next
End Sub
End Class
Public Class CodeNameAddress
Private _strBankAddress As String
Private _strBankName As String
Private _strBankCode As String
Public Property BankAddress() As String
Get
Return _strBankAddress
End Get
Set(ByVal Value As String)
_strBankAddress = value
End Set
End Property
Public Property BankName() As String
Get
Return _strBankName
End Get
Set(ByVal Value As String)
_strBankName = value
End Set
End Property
Public Property BankCode() As String
Get
Return _strBankCode
End Get
Set(ByVal Value As String)
_strBankCode = value
End Set
End Property
Public Sub New(ByVal strBankAddress As String, ByVal strBankName As String, ByVal strBankCode As String)
_strBankAddress = strBankAddress
_strBankName = strBankName
_strBankCode = strBankCode
End Sub
End Class
Cheers, Karl
» CodeProject 2008 MVP
» Microsoft MVP - Client App Dev
My Blog | Mole's Home Page | MVP Profile
Just a grain of sand on the worlds beaches.
<div class="ForumMod">modified on Friday, May 16, 2008 7:43 AM</div>
-- modified 27-Feb-21 21:01pm.
|
|
|
|
|
|
I forgot to mention, NICE Work with the Editable Grid.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hello Karl, if your info is up-to-date, and your employer is empgovpower you might be the best person to answer my q's...
Our company, creates software for law enforcement agencies... one of our major clients, has a deployment where its web based with ASP.... and an oracle back... .. .. you can imagine the nightmare...
our system pretty much gets rid of the "paper" based processes and docs and makes them electronic.
so the review-approve process exists,... a lot of the fancy stuff you can do with applications., doesnt apply to law enforcement agencies as the purpose is pretty specific., however., UI exp can be ofcourse improved.. which is why i have this question for you...
you are actively moving old apps into WPF., i WAS going to redesign the asp web app into a Web service + winforms app., since most local/state agencies have a disconnect with their IT., its easier to give the client an updated thinapp/winform, than have it deployed to the web farms.. i do plan on eventually creating a web based portal... but for now., i have a couple of weeks in which i need to create an application that displays the data that has been colllected + entered., request changes., approve changes., supplement reports., and so on.... as you can see., the greater concern is making sure data is good., and things are entered correctly since many of the documetns are legal documents...
So the main issue is i have no time., ive been with .net since its alpha stages., and i know my stuff., i dont know if i have time to play with wpf and make mistakes...
what do you think i should do?
Wpf now? or winform now, WPF later....
|
|
|
|
|