WCF和WCF的问题

chy3503319 2007-04-19 08:18:29
请问一下
我用WPF的Application程序引用WCF是可以用的
但是
我建WPF的XAMLBrowserApplication程序再引用 就报下面的错误
Cannot create instance of 'Page1' defined in assembly 'XAMLBrowserApplication1, Version=1.0.2300.36101, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'Page1.xaml' Line 1 Position 7.

代码很简单
代码 private void ButtonClick(object sender, RoutedEventArgs e)
{
ATMServices.AccountActivitiesClient myService = new WPFApplication.ATMServices.AccountActivitiesClient();
textBox1.Text = myService.Returnstring();

}
...全文
368 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
LutzMark 2007-07-20
  • 打赏
  • 举报
回复
帮顶帮顶
vainnetwork 2007-07-20
  • 打赏
  • 举报
回复
怎么这么先进都用了
Eri 2007-04-28
  • 打赏
  • 举报
回复
好多天了,没搞定嘛?
可怜我公司电脑还是 Win2K。
amandag 2007-04-28
  • 打赏
  • 举报
回复
这就WCF了...
chy3503319 2007-04-28
  • 打赏
  • 举报
回复
<Page x:Class="XAMLBrowserApplication1.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Page1">
<Grid>
<Button RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" Margin="63,0,0,146.722666666667" Content="Button" Height="21.2766666666666" VerticalAlignment="Bottom" Width="40.0833333333333">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="-44.582"/>
<TranslateTransform X="0" Y="0"/>
</TransformGroup>
</Button.RenderTransform>
</Button>
<TextBox RenderTransformOrigin="0.5,0.5" Margin="6,18.722666666667,13,19.000000000001" Name="textBox1" Text="TextBox" TextWrapping="Wrap" Width="40.0833333333333" Height="21.2766666666666">
<TextBox.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="46.184"/>
<TranslateTransform X="0" Y="0"/>
</TransformGroup>
</TextBox.RenderTransform>
</TextBox>
</Grid>
</Page>
babyrockxray 2007-04-28
  • 打赏
  • 举报
回复
看看page标签对不对
<Page x:Class="WPFBrowserApplication1.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Page1">
babyrockxray 2007-04-28
  • 打赏
  • 举报
回复
没有问题的
把你的Page1.xaml贴出来看看
chy3503319 2007-04-26
  • 打赏
  • 举报
回复
自己在顶2天
letuful 2007-04-23
  • 打赏
  • 举报
回复
路过帮顶
glacier111 2007-04-23
  • 打赏
  • 举报
回复
帮你顶
chy3503319 2007-04-23
  • 打赏
  • 举报
回复
自己顶
CathySun118 2007-04-20
  • 打赏
  • 举报
回复
帮顶
zhulei2008 2007-04-20
  • 打赏
  • 举报
回复
厉害,帮顶
chy3503319 2007-04-20
  • 打赏
  • 举报
回复
人都那去了 没人知道吗
chy3503319 2007-04-20
  • 打赏
  • 举报
回复
顶自己一下
fphuang 2007-04-19
  • 打赏
  • 举报
回复
这么高深
haoanzi 2007-04-19
  • 打赏
  • 举报
回复
'Page1.xaml' 这个有问题
chy3503319 2007-04-19
  • 打赏
  • 举报
回复
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace XAMLBrowserApplication1
{
/// <summary>
/// Interaction logic for Page1.xaml
/// </summary>

public partial class Page1 : System.Windows.Controls.Page
{

public Page1()
{
InitializeComponent();
}
private void ButtonClick(object sender, RoutedEventArgs e)
{
ATMServices.AccountActivitiesClient myService = new WPFApplication.ATMServices.AccountActivitiesClient();
textBox1.Text = myService.Returnstring();

}


}
}

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧