我试图找到在任何新的WP8应用程序中声明静态资源样式的位置.
<TextBlock Text="Delaware" Margin="1,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
Run Code Online (Sandbox Code Playgroud)
例如,我无法在项目中的任何位置找到资源"PhoneTextTitle1Style".我也试过搜索WP8 sdk的Design文件夹无济于事.很高兴发现这些信息在MS的某处清楚地记录下来.也许它是,我忽略了,但我的搜索都没有发现任何东西.
我有一个主视图,呈现两个部分视图.主视图包含表单内的两个部分视图.每个部分视图也包含表单.所有3个视图共享相同的viewmodel.我想要做的是使用主视图封装来自所有视图的数据,并使用部分视图运行特定的Controller动作结果.
我想知道这是否可能.在调试时,我看到我的内容总是发布到主视图表单的HTTPPost.我已相应地为每个表单提交了按钮.对不起代码发布,它的全部拆分.
主要观点:
@using (Html.BeginForm("Main", "Registration", FormMethod.Post,
new { @class="mainform" }))
{
<form>
<fieldset>
<div id ="option1" class="conglomerate">
@Html.Partial("_GetBusiness")
</div>
<div id ="option2" class="dealership">
@Html.Partial("_GetLocation")
</div>
<button type="submit" value="Create" class="buttonBlue" id="">
<span>Create a new dealer</span>
</button>
</fieldset>
</form>
Run Code Online (Sandbox Code Playgroud)
部分1
@using (Html.BeginForm("CreateBusiness", "Business", FormMethod.Post,
new { @class="buisinessform" }))
{
<form>
<div class="editor-field">
@Html.DropDownListFor(m =>m.BusinessId, new SelectList(Model.Businesses,
"BusinessId", "BusinessName"), "")
</div>
<label>Your company not listed? Register yours below:</label>
<div class="editor-label">
@Html.LabelFor(model => model.BusinessName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.BusinessName)
@Html.ValidationMessageFor(model => model.BusinessName) …
Run Code Online (Sandbox Code Playgroud)