This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Nhs.Ui.Code.Extensions.AttributeExtensions | |
@using Resources | |
@model dynamic | |
@{ | |
ViewBag.Title = "Index"; | |
Layout = "~/Areas/Scanning/Views/Shared/_LayoutModule.cshtml"; | |
} | |
<div class="row underheader" id="applicationContent"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locateViewForObject: function(obj, area, elementsToSearch) { | |
var view; | |
if (obj.getView) { | |
view = obj.getView(); | |
if (view) { | |
return this.locateView(view, area, elementsToSearch); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
ViewBag.Title = "Index"; | |
Layout = "~/Areas/Scanning/Views/Shared/_LayoutModule.cshtml"; | |
} | |
<div id="applicationHost"> | |
</div> | |
@section Scripts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<i:Interaction.Behaviors> | |
<framework:OrientationChangedBehavior /> | |
</i:Interaction.Behaviors> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VisualStateManager.VisualStateGroups> | |
<VisualStateGroup> | |
<VisualState x:Name="Portrait"> | |
<Storyboard> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MainTitle" Storyboard.TargetProperty="(FrameworkElement.Visibility)"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SubTitle" Storyboard.TargetProperty="(FrameworkElement.Visibility)"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" /> | |
</ObjectAnimationUsingKeyFrames> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OrientationChangedBehavior : Behavior<PhoneApplicationPage> | |
{ | |
protected override void OnAttached() | |
{ | |
base.OnAttached(); | |
AssociatedObject.OrientationChanged += MainOrientationChanged; | |
SetState(AssociatedObject.Orientation); | |
} | |
private void SetState(PageOrientation orientation) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventToCommand : TriggerAction<FrameworkElement> | |
{ | |
public static readonly DependencyProperty CommandProperty = DependencyProperty.Register | |
("Command", typeof (ICommand), typeof (EventToCommand), new PropertyMetadata(default(ICommand))); | |
public ICommand Command | |
{ | |
get { return (ICommand) GetValue(CommandProperty); } | |
set { SetValue(CommandProperty, value); } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<i:Interaction.Triggers> | |
<i:EventTrigger EventName="Tap"> | |
<framework:EventToCommand Command="{Binding Path=ChangeValue}" /> | |
</i:EventTrigger> | |
</i:Interaction.Triggers> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class ViewmodelCreator : ICreateViewmodels | |
{ | |
private readonly IDeserializeObjects _deserializer; | |
public ViewmodelCreator(IDeserializeObjects deserializer) | |
{ | |
_deserializer = deserializer; | |
} | |
public object CreateFrom(Dictionary<string, string> paramList) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MvvmPage : PhoneApplicationPage | |
{ | |
protected override void OnNavigatedTo(NavigationEventArgs e) | |
{ | |
base.OnNavigatedTo(e); | |
var uri = e.Uri; | |
var paramList = uri.GetParamsFromUri(); | |
var viewmodelCreator = InstanceCreatorSingleton.Instance.CreateInstanceOf<ICreateViewmodels>(); |