|
I'm trying to do a simple thing and WPF doesn't allow me to. I want to show a login form before running the main form. The login does run but the main form doesn't. It throws an ExecutionEngineException with message “Exception of type 'System.ExecutionEngineException' was thrown.” with no inner exception.
I hope someone tell me the right way to do it before I turn to a workaround. Thank you in advance.
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
var login = new Login();
if (login.ShowDialog() == true)
{
var main = new MainForm();
Run(main);
}
}
}
Eslam Afifi
|
|
|
|
|
It turned out to be a low memory issue since I was running a virtual machine on a 1 GB RAM . Sorry if I wasted your time.
.Show works so does .ShowDialog
.Run doesn't since it's not what it is intended to do.
Eslam Afifi
|
|
|
|
|
Hi Everybody,
I have Silverlight application and WCF Service under one solution.In my application i'm bionding some data ( from sql server ) to DataGrid. If i run this application in my system result is coming properly i mean data was binding to datagrid correctly.
If i publish this website in my IIS by using new -> virtual directory. Error is coming like " Unhandled Error in Silverlight 2 Application An Exception occurred during the operation, making the result invalid ". For reference i'm giving my web.config file also here:
<system.servicemodel>
<behaviors>
<servicebehaviors>
<behavior name="TestProject.Web.TestSilverLightServiceBehavior">
<servicemetadata httpgetenabled="true" />
<servicedebug includeexceptiondetailinfaults="false" />
</behavior>
</servicebehaviors>
</behaviors>
<servicehostingenvironment aspnetcompatibilityenabled="true" />
<services>
<service behaviorconfiguration="TestProject.Web.TestSilverLightServiceBehavior" name="TestProject.Web.TestSilverLightService">
<endpoint address="http://localhost/TestSilverLightService.svc" binding="basicHttpBinding" contract="TestProject.Web.TestSilverLightService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.servicemodel>
endpoint address i tried in different ways also:
like
1. <endpoint address="" binding="basicHttpBinding" contract="TestProject.Web.TestSilverLightService" />
2. <endpoint address="http://localhost/TestSilverLightService.svc" binding="basicHttpBinding" contract="TestProject.Web.TestSilverLightService" />
3. <endpoint address="http://wm8bgfhos-062a(mySystemName)/ TestSilverLightService.svc" binding="basicHttpBinding" contract="TestProject.Web.TestSilverLightService" />
Please help me to solve this issue.
Thanks in advance from core of my heart
|
|
|
|
|
Publish the WCF service on your host, and then check you can access the metadata. (the .svc file)
|
|
|
|
|
Hi All,
I'm having horrendous problems getting a WCF service secured and available outside our network domain.
I've got little to no IIS experience to boot making this whole process really painful at the moment. Does anyone know of any good links on how to show a dummy what is actually required in order to make this work?
|
|
|
|
|
|
Thanks so much for this Mark, I'm going to work my way through the links you provided this morning.
I'm on IIS6 on Server2003 ... do you think it would be prudent to upgrade this to IIS7 before moving forward?
|
|
|
|
|
Well - IIS7 was introduced with Vista. You can't run it on Server 2003.
|
|
|
|
|
Wooo!
I love it when things are clear cut!
Thanks Pete.
|
|
|
|
|
Dear All,
I just want to redesign one of our unmanaged VC++ apps.
I have drilled WPF for several weeks,but no solution has been found.
Because I can not play video stream from our unmanaged VC++ apps in UI.(I want to use CCW for communication between the managed WPF UI and unmanaged VC++ apps)
I am a beginner in programe, and thirsty for a solution.
Any hint and suggestion will be appreciated!
|
|
|
|
|
I don't know what the best solution for you is, but in my opinion
WPF isn't the best solution if you stay with C++.
First, WPF is managed. Second, you'll get no designer support in
Visual Studio or Expression for C++.
If WPF's features and programming model suit your needs, I would use
C# for the UI, keep your existing native C++ in DLLs if necessary, and
use C++/CLI to bridge between the managed and native code.
In fact, that's what I did/do
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I appreciated your answer deeply.
Our native C++ app is such a big system based on document/view framework of MFC,including 10 dlls at least,that UI is only one of those.Replacing the UI with a new one with friendly outlook and usage is my task.
I will research C++/CLI at right.
Any solution else, other than WPF?
modified on Wednesday, January 7, 2009 10:02 PM
|
|
|
|
|
Hi all.
How can we simulate DragMove() method for the other elements in a WPF window ?
It means we could move an element with mouse points
|
|
|
|
|
|
Nice response. Thanks Karl
|
|
|
|
|
Pleasure, glad to help.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hi,
I have a xbap(browser based) wpf application.
I have a htmlhelp file(.chm) which has to be integrated with the application ie on pressing F1 instead of internet explorer help opening up,the htmlhelp file should open.
I am struggling with this for the past one week.
Please help.
|
|
|
|
|
I need to figure out how to customize cut&paste built in command on a context menu to do multiple functions. I need to highlight text from a text box then click on the context menu which shows up after right click, which needs to take me to a new form and automatically paste the text in another Text Box on the new form. I'm wondering if this is possible???
Any help would be appreciated..
Thank You!!
|
|
|
|
|
|
I have JSON string as a out put of some http://localhost:1586/Versentia.Web.UI/DataHandler.ashx
where requestAction = GetAll and requestType: ObjectInstances.
When I see the response using firebug, I can see the data returned by GetAll method,
But when I write follwing code, I don't get data;
var url = new Uri("http://localhost:1586/Versentia.Web.UI/DataHandler.ashx/");
WebRequest request = WebRequest.Create(url);
var response = (HttpWebResponse)request.GetResponse();
Stream dataStream = response.GetResponseStream();
var reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
var metaData =responseFromServer.Deserialize<dictionary><string,object>>();
I don't know how to access the GetAll method to retrieve the ObjectInstances object. I want to create WPF based on the retrived object. I am very new to programming and need to achieve this asap.
Please help.
Veena
|
|
|
|
|
In my WPF browser based application, I want to display a page with tab control. Each tab item in the tab control will display data for a single object in a collection in the application. The number of objects in the collection is known only at run time (so I don't know how many tabs the application will display at design time).
How can I create the content (edit boxes, labels, etc. for various data values of the object) on tab items that are dynamically created by the application based on the number of objects in the collection?
Any suggestions?
Thank you
|
|
|
|
|
Use a datatemplate to create your tabitems.
Use a ContentControl to display your collection, with this new datatemplate.
|
|
|
|
|
Hello,
I used this MSDN guide (http://msdn.microsoft.com/en-us/library/aa581779.aspx[^]) to build BLL for my application. The DAL behind that BLL is a TypedDataSet.
To explain what i'm trying to achive i'll use two tables from the database:
Authors Table
-------------
AuthorID
Name
RankID
Authors Table
-------------
RankID
RankTitle
In the database i have a relation between these tables.
Following the mentioned MSDN guide i created BL objects for each table that return typed data tables, for example:
AuthorsBL.GetAuthors() returns AuthorsDataTable, AuthorRanksBL.GetAuthorRanks() reutrn AuthorRanksDataTable.
What i'm trying to figure out is how to create a window in WPF with a list box that lists all authors, a text box to edit the author's name and a combobox to edit/select the author's rank.
I can bind the listbox to the authors object and it shows the records, i can bind the combobox to the AuthorRanks table and it shows all records but i can't find a way to do so that when the selection in the listbox changes the combobox's selection will update too. I'm trying to do this the "right" way, as i see it, by using the XAML properties like DataContext, ItemSource, SelectedValue and SelectedValue path.
In the end i need to have a "Save" button to save all the changes so correct data binding is very important for me.
I'm not sure how to approach this, maybe the BLL should be built in a different way for WPF or i need some extra configuration in XAML.
Any help, explanation or a link to a guide will be most appriciated!
Thanks,
darthBug
Join the dark side of the code
|
|
|
|
|
Hi.
I'm going to create a layer above of any elements !
In HTML we could do it with a something like this :
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
</style>
</head>
<body>
<div id="apDiv1"></div>
</body>
</html>
Now I wanna know, we could do it in XAML ?
Is it possible ?
|
|
|
|
|
If you want to bring things to the front in WPF, then you really need to take a look at the 3D features of WPF. Welcome to the thing that really sets WPF apart from Win Forms.
|
|
|
|