我在Windows Phone中使用相机做应用程序.任何人都可以说,如何在使用Camera Capture点击后获取图像我想在其他页面中显示该图像,我想添加一些关于它的材料,而不是我喜欢保存.请任何一个指南我
我有带有Image Url的String Array
数组样本图片:
string Image = "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn2/187738_100000230436565_1427264428_q.jpg";
Run Code Online (Sandbox Code Playgroud)
现在我需要在Xaml中绑定图像
<Image Name="img" HorizontalAlignment="Left" VerticalAlignment="Top" Width="66" Height="66" Source="{Binding Image} " />
Run Code Online (Sandbox Code Playgroud)
试图给img.source但不接受因为con't实现字符串到system.windows.media.imagesource
现在我正在将 .Net MVC 应用程序转换为 .Net Core App
要记录我们在 MVC 中使用“HttpContext”的事件
LoggerException loggerException = new LoggerException();
loggerException.ApplicationName = "Service";
loggerException.Level = logLevel;
loggerException.Timestamp = DateTime.UtcNow.ToString();
loggerException.UserController = HttpContext.Current.Request.Url.Segments[2];
loggerException.Action = HttpContext.Current.Request.Url.Segments[3];
loggerException.IpAddress = HttpContext.Current.Request.UserHostAddress;
Run Code Online (Sandbox Code Playgroud)
在 .Net Core 中,“IHttpContextAccessor”是“HttpContext”的替代品。我无法获得用户控制器和操作
我当前的 .net 核心代码
LoggerException loggerException = new LoggerException();
loggerException.ApplicationName = appName;
loggerException.Level = logLevel;
loggerException.Timestamp = DateTime.UtcNow;
//loggerException.UserController = httpContextAccessor.HttpContext != null ? httpContextAccessor.HttpContext.User.ToString() : string.Empty;
//loggerException.Action = httpContextAccessor.HttpContext != null ? httpContextAccessor.HttpContext. : string.Empty;
loggerException.IpAddress = httpContextAccessor.HttpContext != null ? httpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString() : …Run Code Online (Sandbox Code Playgroud) 听到我将一些ObservableCollection数据绑定到我的文本块有一些时间差我没有任何动画显示数据,但我需要动画来显示.这是我的代码:
DispatcherTimer timer = new DispatcherTimer();
public ObservableCollection<ItemViewModel> Items { get; private set; }
public Slideshow()
{
InitializeComponent();
this.Items = new ObservableCollection<ItemViewModel>();
DataContext = App.ViewModel;
this.Items = App.ViewModel.Items;
}
private void PhoneApplicationPage_Loaded_1(object sender, RoutedEventArgs e)
{
itemNumber = 0;
Name.Text = this.Items[itemNumber].LineOne;
if (!App.ViewModel.IsDataLoaded)
{
App.ViewModel.LoadData();
}
timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(5);
timer.Tick += new EventHandler(timer_Tick);
itemNumber++;
timer.Start();
}
public void timer_Tick(object sender, EventArgs e)
{
if (this.Items.Count > 0)
{
itemNumber++;
Name.Text = this.Items[itemNumber].LineOne;
if …Run Code Online (Sandbox Code Playgroud) 通过按 Enter 键需要以下面的角度 4 提交表单是我表单中的代码Action = ""不起作用。我还尝试使用(keydown) = domonething(event)和(keydown.enter) = domonething(event)
使用以下代码
keyDownFunction(event) {
if (event.keyCode == 13) {
this.submit();
}
}
Run Code Online (Sandbox Code Playgroud)
下面是我当前的代码
<form #f="ngForm" (ngSubmit)="f.form.valid && openModal(confirmationmodal)" novalidate action="">
<div class="form-group form-row">
<label class="col-form-label col-sm-4 col-md-4" for="name">Employee Name</label>
<div class="col-sm-8 col-md-8">
<span type="text" readonly class="form-control-plaintext" id="name">{{employeeDetails.EmployeeName}}</span>
</div>
</div>
<div class="form-group form-row">
<label class="col-form-label col-sm-4 col-md-4 " for="name">Manager Name</label>
<div class="col-md-8 col-sm-8">
<span type="text" readonly class="form-control-plaintext"
id="manager">{{employeeDetails.ManagerName}}</span>
</div>
</div>
<div class="form-group form-row">
<label for="name" class="col-sm-4 …Run Code Online (Sandbox Code Playgroud)