首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答
筛选
回答情况:
全部无回答回答未采纳
提问时间:
不限一周内一月内三月内一年内
回答标签:
wpf

OxyPlot放大一定程度后,折线图没了,怎么办?

编辑2025-02-1878
CoovallyAIHub
数据差异过大时,设置过度狭窄的y轴范围会导致部分数据被压缩或消失,建议使用对数坐标轴或适当调整y轴范围。
1人回答了此问题

请问如何使用apache-poi的HWPFdocument解析doc格式文档标题编号?

编辑2022-12-30483
用户9528610
有没有大神知道的,最好贴出获取标题编号的代码,先谢谢了
1人回答了此问题

WPF treeview?

编辑2021-06-28189
EatRice
您好,相关文章问题请到文档页面底部进行提问
1人回答了此问题

实时音视频C#SDK支持WPF控件展示?

tangmanger
https://cloud.tencent.com/developer/article/1871437 我之前遇到过这样的 但是因为渲染方式不同导致图像覆盖在wpf 控件上,如果你想要wpf控件覆盖到视频上请参考此方法
1人回答了此问题

如何在WPF中显示渐进JPEG?

提问2018-03-28302
djgump回答已采纳
可以尝试下: XAML: <Window x:Class="ScrollViewerTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" DataContext="{Binding RelativeSource={RelativeSource Self}}"> <StackPanel> <TextBlock Text="{Binding Path=Progress, StringFormat=Progress: {0}}" /> <Image Source="{Binding Path=Image}" /> </StackPanel> </Window> 代码: public partial class MainWindow : Window, INotifyPropertyChanged { #region Public Properties private int _progress; public int Progress { get { return _progress; } set { if (_progress != value) { _progress = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Progress")); } } } private BitmapImage image; public BitmapImage Image { get { return image; } set { if (image != value) { image = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Image")); } } } #endregion BackgroundWorker worker = new BackgroundWorker(); public MainWindow() { InitializeComponent(); worker.DoWork += backgroundWorker1_DoWork; worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged); worker.WorkerReportsProgress = true; worker.RunWorkerAsync(@"http://Tools.CentralShooters.co.nz/Images/ProgressiveSample1.jpg"); } // This function is based on code from // http://devtoolshed.com/content/c-download-file-progress-bar private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { // the URL to download the file from string sUrlToReadFileFrom = e.Argument as string; // first, we need to get the exact size (in bytes) of the file we are downloading Uri url = new Uri(sUrlToReadFileFrom); System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url); System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse(); response.Close(); // gets the size of the file in bytes Int64 iSize = response.ContentLength; // keeps track of the total bytes downloaded so we can update the progress bar Int64 iRunningByteTotal = 0; // use the webclient object to download the file using (System.Net.WebClient client = new System.Net.WebClient()) { // open the file at the remote URL for reading using (System.IO.Stream streamRemote = client.OpenRead(new Uri(sUrlToReadFileFrom))) { using (Stream streamLocal = new MemoryStream((int)iSize)) { // loop the stream and get the file into the byte buffer int iByteSize = 0; byte[] byteBuffer = new byte[iSize]; while ((iByteSize = streamRemote.Read(byteBuffer, 0, byteBuffer.Length)) > 0) { // write the bytes to the file system at the file path specified streamLocal.Write(byteBuffer, 0, iByteSize); iRunningByteTotal += iByteSize; // calculate the progress out of a base "100" double dIndex = (double)(iRunningByteTotal); double dTotal = (double)byteBuffer.Length; double dProgressPercentage = (dIndex / dTotal); int iProgressPercentage = (int)(dProgressPercentage * 100); // update the progress bar, and we pass our MemoryStream, // so we can use it in the progress changed event handler worker.ReportProgress(iProgressPercentage, streamLocal); } // clean up the file stream streamLocal.Close(); } // close the connection to the remote server streamRemote.Close(); } } } void worker_ProgressChanged(object sender, ProgressChangedEventArgs e) { Dispatcher.BeginInvoke( System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate() { MemoryStream stream = e.UserState as MemoryStream; BitmapImage bi = new BitmapImage(); bi.BeginInit(); bi.StreamSource = new MemoryStream(stream.ToArray()); bi.EndInit(); this.Progress = e.ProgressPercentage; this.Image = bi; } )); } public event PropertyChangedEventHandler PropertyChanged; }
2人回答了此问题

StaticResource和WPF中的DynamicResource有什么区别?

提问2017-12-211K
心愿
StaticResource将在对象构造上解析。 每当控制需要资源时,DynamicResource将被评估和解决
2人回答了此问题

元数据文件'.dll'找不到?

提问2017-12-26281
心愿
我也遇到了这个问题。首先,你必须手动建立你的DLL项目,右键单击Build。然后它会工作。
2人回答了此问题

如何转换动画颜色?

提问2018-02-05378
akjok54
下面是一个使用故事板动画矩形渐变的例子。 <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="GradientBrushAnimation.MainWindow" x:Name="Window" Title="MainWindow" Width="640" Height="480"> <Window.Resources> <Storyboard x:Key="Storyboard1"> <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="rectangle"> <EasingColorKeyFrame KeyTime="0:0:2" Value="Red"/> </ColorAnimationUsingKeyFrames> <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle"> <EasingColorKeyFrame KeyTime="0:0:2" Value="#FF71FF00"/> </ColorAnimationUsingKeyFrames> </Storyboard> </Window.Resources> <Window.Triggers> <EventTrigger RoutedEvent="FrameworkElement.Loaded"> <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/> </EventTrigger> </Window.Triggers> <Grid x:Name="LayoutRoot"> <Rectangle x:Name="rectangle" Margin="78,102,292,144" Stroke="Black"> <Rectangle.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0"/> <GradientStop Color="White" Offset="1"/> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> </Grid> </Window>
2人回答了此问题

在WPF中,x:Name和Name属性有什么区别?

提问2017-12-191.3K
心愿
它们不是同一样东西。 x:Name是一个xaml概念,主要用于引用元素。当你给一个元素x:Name xaml属性时,“指定x:Name变成当处理xaml时在底层代码中创建的字段的名称,并且该字段保存对该对象的引用。(MSDN)所以,这是一个设计器生成的字段,默认情况下具有内部访问权限。 Name是a的现有字符串属性FrameworkElement,以xaml属性的形式列示为任何其他wpf元素属性。 因此,这也意味着x:Name可以用于更广泛的对象。这是一种使xaml中的任何内容都能被给定名称引用的技术。
2人回答了此问题

高效而且灵活不符合,所以本文就来告诉大家如何使用 SharpDx 高性能渲染同时使用 WPF 的元素?

编辑2025-08-2152
成为首答用户吧

WPF窗口大小与窗口边框大小不一样?

编辑2025-08-1929
成为首答用户吧

Web TIC.joinClassroom win7提示NOT_SUPPORTED 4098 ?

编辑2020-08-18248
成为首答用户吧
Hi~
今天想聊点什么呢?
近期活跃用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档