wpf frame制作安装程序时,怎样把.netframeqwork4打包进去

补丁搜索:
> 游戏工具
Microsoft .NET Framework 4(独立安装程序)
==&&由800vod提供==&&由51mag提供==&&由99DDD提供
玩家还下载了这些补丁
游戏运行必备补丁
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
最新更新TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
年度最热门TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
本周关注TOP10
1&&2&&3&&4&&5&&6&&7&&8&&9&&10&
热门攻略专辑
热门补丁推荐
周人气排行榜
精品手机游戏
精彩高清图推荐
| 增值电信业务经营许可证 浙B2- |
浙网文[1 | CopyRight (C)
ALi213.Net All Right Reserved 游侠网 版权所有已被0人收藏
&为什么XP系统安装FRAME WORK 4 总是失败?
来自:保密
发帖:861+5110
为什么XP系统安装FRAME WORK 4 总是失败?
-------------------------------------------------------------------------------------------
这个家伙很懒,什么也没留下......
来自:保密
发帖:18+59
侬装windows install了伐
-------------------------------------------------------------------------------------------
这个家伙很懒,什么也没留下......
来自:保密
发帖:12+275
装2.1试试看
-------------------------------------------------------------------------------------------
人虽然不是个东西,可人活着也就是买东西吃东西。
来自:保密
发帖:99+1188
控制面板,管理工具,服务,里面把windows install服务开启
-------------------------------------------------------------------------------------------
顾左右而言他~
来自:保密
发帖:313+6478
XP 不支持。net 4.0,你怎么装成功啊
-------------------------------------------------------------------------------------------
为人君,止于仁;为人臣,止于敬;为人子,止于孝;为人父,止于慈;与国交,止于信。
来自:保密
发帖:313+6479
XP 不支持。net 4.0,你怎么装成功啊
查了一下好像支持的,但是需要xp sp3.
具体可以参考
/Article/48/65/.htm
-------------------------------------------------------------------------------------------
为人君,止于仁;为人臣,止于敬;为人子,止于孝;为人父,止于慈;与国交,止于信。
来自:保密
发帖:4+3041
windows install 升级一下。
-------------------------------------------------------------------------------------------
Je suis grand hippopotame.
来自:保密
发帖:812+9390
把install服务开启,如果还是不行,试一下微软的framework清除工具,再重新安装
/kb/2497934/zh-cn
-------------------------------------------------------------------------------------------
来自:保密
发帖:137+2979
别用第三方的 我别的网站下的就死活装不上(游侠下载的) 还有不知道分不分32位和64位 另外是不是需要先装3.5 实在不行就重装系统再试吧 我也和4楼一样一直以为4.0不支持xp
-------------------------------------------------------------------------------------------
首先,请你以一种,团成一个团的姿势,然后,慢慢地比较圆润的方式,离开这座让你讨厌的城市,或者讨厌的人的周围首先,请你以一种,团成一个团的姿势,然后,慢慢地比较圆润的方式,离开这座让你讨厌的城市,或者讨厌的人的周围
为什么XP系统安装FRAME WORK 4 总是失败?
扫描关注官方微信
扫描下载客户端
你可以发私信给一个或多个听众。默认不能发给非听众,除非对方设置了允许。
奖励分值:您今日还有 3 点分值可以奖励 [ 20 点奖分可自动换取 1 点PP]
请输入4位有相同表情的数字
宽带山警务室
&违反国家法律
&含有色情内容
&对他人进行恶意攻击
&散布广告以及其它商业化的宣传
&干扰或混乱kds宽带山网络服务
&发布任何包含种族、 性别、宗教歧视性和猥亵性的信息内容
&网页不能打开
&图片不能显示
已报名参加的人员:One framework to rule us all…
& WPF Input Validation Part 1: Tutorial and examples
WPF Input Validation Part 1: Tutorial and examples
Posted in , ,
I’ve recently set up a sample of a validation mechanism for WPF text input controls on the UI that I thought it would be of general interest due to the “Gokuu approach”* I’ve done with it, otherwise it just wouldn’t make my day
The requirement is to create a UI control behavior that visually signals validation errors over user input, so when the user submits empty or invalid data on a mandatory field, the input control changes it’s appearance or some kind of action takes place, like a validation message box. Then, it should prevent data submission when a button is clicked or the Enter key is pressed, for instance.
I’m talking about WPF Validation Rules. Validation Rules are objects that apply validation over a data Binding operation, and they are added to the Binding.ValidationRules Collection. They can be created by deriving from the ValidationRule class and overriding its Validate method that should hold the validation logic. Then, normally, you would add the rule to the collection in your xaml code, through property element syntax, or in code.
Although not a part of this article, there’s another validation mechanism built into WPF. You can also test one’s input through an ExceptionValidationRule, which invalidates a value if there are exceptions during source updates of the binding source property. You can even provide custom logic to specify how the binding engine handles these exceptions by using a UpdateSourceExceptionFilterCallback.
These series of articles will focus on creating and applying custom validation rules the most effective way. I’ll discuss this in an incremental way, building up a structured thinking till an acceptable solution is reached.
Moving on… We should then start with a simple WPF application, with it’s main window as our demo canvas. Lets a text control to fetch some user input to validate, say, a TextBox control, and make it data bound to a property that lives on the Window control itself. We’ll set it as it’s own DataContext for that.
&Window x:Class="ValidationSample1.ValidationWindow"
xmlns="/winfx/2006/xaml/presentation"
xmlns:x="/winfx/2006/xaml"
xmlns:Rules="clr-namespace:ValidationSample1"
Title="ValidationWindow" Height="200" Width="300"&
&Window.Resources&
&/Window.Resources&
&Grid VerticalAlignment="Center" HorizontalAlignment="Center"&
&StackPanel Name="ValidationPanel" &
&Label&Validated Text Box:&/Label&
&TextBox x:Name="ValidatedTextBox"
Width="200"/&
&/TextBox&
&/StackPanel&
1234567891011121314151617
<Window x:Class="ValidationSample1.ValidationWindow"&&&&xmlns="/winfx/2006/xaml/presentation"&&&&xmlns:x="/winfx/2006/xaml"&&&&xmlns:Rules="clr-namespace:ValidationSample1"&&&&Title="ValidationWindow" Height="200" Width="300"&&&&&<Window.Resources>&&&&&</Window.Resources>&&&&<Grid VerticalAlignment="Center" HorizontalAlignment="Center"&&&&&&&&&<StackPanel Name="ValidationPanel" &&&&&&&&&&&&&<Label>Validated Text Box:</Label>&&&&&&&&&&&&<TextBox x:Name="ValidatedTextBox"&&&&&&&&&&&&&&&&&&&& Width="200"/&&&&&&&&&&&&&</TextBox>&&&&&&&&</StackPanel>&&&&</Grid></Window>
#region #using Directives
using System.W
#endregion
namespace ValidationSample1
/// &summary&
/// Interaction logic for ValidationWindow.xaml
/// &/summary&
public partial class ValidationWindow : Window, INotifyPropertyChanged
public string myP
public string MyProperty
get { return myP }
if (value == myProperty)
myProperty =
OnNotifyPropertyChanged("myProperty");
public ValidationWindow()
InitializeComponent();
DataContext =
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyC
private void OnNotifyPropertyChanged(string propertyName)
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
#endregion
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
#region #using Directives&using System.ComponentModel;using System.Windows;&#endregion&namespace ValidationSample1{&&&&/// <summary>&&&&/// Interaction logic for ValidationWindow.xaml&&&&/// </summary>&&&&public partial class ValidationWindow : Window, INotifyPropertyChanged&&&&{&&&&&&&&public string myProperty;&&&&&&&&&public string MyProperty&&&&&&&&{&&&&&&&&&&&&get { return myProperty; }&&&&&&&&&&&&set&&&&&&&&&&&&{&&&&&&&&&&&&&&&&if (value == myProperty)&&&&&&&&&&&&&&&&&&&&return;&&&&&&&&&&&&&&&&&myProperty = value;&&&&&&&&&&&&&&&&OnNotifyPropertyChanged("myProperty");&&&&&&&&&&&&}&&&&&&&&}&&&&&&&&&public ValidationWindow()&&&&&&&&{&&&&&&&&&&&&InitializeComponent();&&&&&&&&&&&&&DataContext = this;&&&&&&&&}&&&&&&&&&#region INotifyPropertyChanged Members&&&&&&&&&public event PropertyChangedEventHandler PropertyChanged;&&&&&&&&&private void OnNotifyPropertyChanged(string propertyName)&&&&&&&&{&&&&&&&&&&&&if (PropertyChanged != null)&&&&&&&&&&&&{&&&&&&&&&&&&&&&&PropertyChanged(this, new PropertyChangedEventArgs(propertyName));&&&&&&&&&&&&}&&&&&&&&}&&&&&&&&&#endregion&&&&}}
Now we need to make sure the user doesn’t submit empty data and visually indicate him that same requirement. For that, we’re going to create a custom ValidationRule to prevent the user from submitting empty text. Like I said, this is done by extending the System.Windows.Controls.ValidationRule class:
#region #using Directives
using System.G
using System.Windows.C
#endregion
namespace ValidationSample1
public class MandatoryInputRule : ValidationRule
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
if (value != null)
string input =
if (input.Length & 0)
return new ValidationResult(true, null);
return new ValidationResult(false, "Validation error. Field input required.");
12345678910111213141516171819202122232425
#region #using Directives&using System.Globalization;using System.Windows.Controls;&#endregion&namespace ValidationSample1{&&&&public class MandatoryInputRule : ValidationRule&&&&{&&&&&&&&public override ValidationResult Validate(object value, CultureInfo cultureInfo)&&&&&&&&{&&&&&&&&&&&&if (value != null)&&&&&&&&&&&&{&&&&&&&&&&&&&&&&string input = value as string;&&&&&&&&&&&&&&&&&if (input.Length > 0)&&&&&&&&&&&&&&&&&&&&return new ValidationResult(true, null);&&&&&&&&&&&&}&&&&&&&&&&&&&return new ValidationResult(false, "Validation error. Field input required.");&&&&&&&&}&&&&}}
The next step is to connect the Validation Rule to the binding target. To do so, you can go either the XAML way or in code. I’ll show you the first approach.
&TextBox x:Name="ValidatedTextBox"
Width="200"&
&TextBox.Text&
Textbox notifies changes when Text is changed, and not focus. --&
&Binding Path="MyProperty" UpdateSourceTrigger="PropertyChanged"&
&Binding.ValidationRules&
Validation rule set to run when binding target is updated. --&
&Rules:MandatoryInputRule ValidatesOnTargetUpdated="True" /&
&/Binding.ValidationRules&
&/Binding&
&/TextBox.Text&
&/TextBox&
123456789101112
<TextBox x:Name="ValidatedTextBox"&&&&&&&& Width="200"&&&&&<TextBox.Text>&&&&&&&&<!--&&Textbox notifies changes when Text is changed, and not focus. -->&&&&&&&&<Binding Path="MyProperty" UpdateSourceTrigger="PropertyChanged"&&&&&&&&&&&&&<Binding.ValidationRules>&&&&&&&&&&&&&&&&<!--&&Validation rule set to run when binding target is updated. -->&&&&&&&&&&&&&&&&<Rules:MandatoryInputRule ValidatesOnTargetUpdated="True" /&&&&&&&&&&&&&</Binding.ValidationRules>&&&&&&&&</Binding>&&&&</TextBox.Text></TextBox>
Notice that our binding object sets the UpdateSourceTrigger property to PropertyChanged. This is needed because TextBox updates it’s source when it loses Focus and as such, the default value of UpdateSourceTrigger for the TextBox is LostFocus. In this example, this isn’t enough. We need to analyze the data as user writes. So the ideal update behavior is to trigger when data, or property changes, hence the UpdateSourceTrigger.PropertyChanged value in the preceding example.
For now, our binding is empty value-aware due to the validation rule we applied. But wait! If we run the app, nothing happens. It still doesn’t manifest visually when user submits no text. We must specify a style behavior for when validations errors occur, the user gets warned through visual changes in the control. So we’ll add a style to the Window Resources collection and set it on the TextBox. The XAML would go like this:
&Window x:Class="ValidationSample1.ValidationWindow"
xmlns="/winfx/2006/xaml/presentation"
xmlns:x="/winfx/2006/xaml"
xmlns:Rules="clr-namespace:ValidationSample1"
Title="ValidationWindow" Height="200" Width="300"&
&Window.Resources&
&Style x:Key="EditableTextBox" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}"&
&Setter Property="Background" Value="#DDFFDD" /&
&Setter Property="Validation.ErrorTemplate"&
&Setter.Value&
&ControlTemplate&
&Border BorderBrush="Red" BorderThickness="2"&
&AdornedElementPlaceholder /&
&/ControlTemplate&
&/Setter.Value&
&Style.Triggers&
&Trigger Property="Validation.HasError" Value="true"&
&Setter Property="Background" Value="#FFDDDD"/&
&/Trigger&
&/Style.Triggers&
&/Window.Resources&
&Grid VerticalAlignment="Center" HorizontalAlignment="Center"&
&StackPanel Name="ValidationPanel" &
&Label&Validated Text Box:&/Label&
&TextBox x:Name="ValidatedTextBox"
Width="200"
Style="{DynamicResource EditableTextBox}"&
&TextBox.Text&
Textbox notifies changes when Text is changed, and not focus. --&
&Binding Path="MyProperty" UpdateSourceTrigger="PropertyChanged"&
&Binding.ValidationRules&
Validation rule set to run when binding target is updated. --&
&Rules:MandatoryInputRule ValidatesOnTargetUpdated="True" /&
&/Binding.ValidationRules&
&/Binding&
&/TextBox.Text&
&/TextBox&
&/StackPanel&
12345678910111213141516171819202122232425262728293031323334353637383940414243
<Window x:Class="ValidationSample1.ValidationWindow"&&&&xmlns="/winfx/2006/xaml/presentation"&&&&xmlns:x="/winfx/2006/xaml"&&&&xmlns:Rules="clr-namespace:ValidationSample1"&&&&Title="ValidationWindow" Height="200" Width="300"&&&&&<Window.Resources>&&&&&&&&<Style x:Key="EditableTextBox" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}"&&&&&&&&&&&&&<Setter Property="Background" Value="#DDFFDD" /&&&&&&&&&&&&&<Setter Property="Validation.ErrorTemplate"&&&&&&&&&&&&&&&&&<Setter.Value>&&&&&&&&&&&&&&&&&&&&<ControlTemplate>&&&&&&&&&&&&&&&&&&&&&&&&<Border BorderBrush="Red" BorderThickness="2"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&<AdornedElementPlaceholder />&&&&&&&&&&&&&&&&&&&&&&&&</Border>&&&&&&&&&&&&&&&&&&&&</ControlTemplate>&&&&&&&&&&&&&&&&</Setter.Value>&&&&&&&&&&&&</Setter>&&&&&&&&&&&&<Style.Triggers>&&&&&&&&&&&&&&&&<Trigger Property="Validation.HasError" Value="true"&&&&&&&&&&&&&&&&&&&&&<Setter Property="Background" Value="#FFDDDD"/&&&&&&&&&&&&&&&&&</Trigger>&&&&&&&&&&&&</Style.Triggers>&&&&&&&&</Style>&&&&</Window.Resources>&&&&<Grid VerticalAlignment="Center" HorizontalAlignment="Center"&&&&&&&&&<StackPanel Name="ValidationPanel" &&&&&&&&&&&&&<Label>Validated Text Box:</Label>&&&&&&&&&&&&<TextBox x:Name="ValidatedTextBox"&&&&&&&&&&&&&&&&&&&& Width="200"&&&&&&&&&&&&&&&&&&&& Style="{DynamicResource EditableTextBox}"&&&&&&&&&&&&&&&&&<TextBox.Text>&&&&&&&&&&&&&&&&&&&&<!--&&Textbox notifies changes when Text is changed, and not focus. -->&&&&&&&&&&&&&&&&&&&&<Binding Path="MyProperty" UpdateSourceTrigger="PropertyChanged"&&&&&&&&&&&&&&&&&&&&&&&&&<Binding.ValidationRules>&&&&&&&&&&&&&&&&&&&&&&&&&&&&<!--&&Validation rule set to run when binding target is updated. -->&&&&&&&&&&&&&&&&&&&&&&&&&&&&<Rules:MandatoryInputRule ValidatesOnTargetUpdated="True" /&&&&&&&&&&&&&&&&&&&&&&&&&</Binding.ValidationRules>&&&&&&&&&&&&&&&&&&&&</Binding>&&&&&&&&&&&&&&&&</TextBox.Text>&&&&&&&&&&&&</TextBox>&&&&&&&&</StackPanel>&&&&</Grid></Window>
Now, the user sees a red border when no text is submitted. So the task is complete, but I can’t stop wondering the amount of code needed to add validation to a single control. Imagine an entire form…
The will present a new approach to this implementation and will require much less code.
* “Goku approach” is an analogy that means one’s accomplished the basic and most objective functional requirement, but then he can’t stop feeling an urge to improve the implementation whether performance, architectural or usability-wise. So that’s when code tends to get upgraded to the next level, shall we say a super level or “super-sayin”, like in the Dragon Ball anime. And after that, the same urge may arise again, and again, giving way to the typical Goku-powerup pattern that the main character faces along the series when needs to evolve to face his enemies
Leave a Reply

我要回帖

更多关于 cf体验服怎么挤进去 的文章

 

随机推荐