AxWindowsMediaPlayer大小在WPF应用程序 [英] AxWindowsMediaPlayer size in WPF applications

查看:291
本文介绍了AxWindowsMediaPlayer大小在WPF应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 AxWindowsMediaPlayer WindowsFormsHost 在WPF应用程序。

I am using an AxWindowsMediaPlayer in a WindowsFormsHost in a WPF application.

我在与大小的控制问题。

I'm having problems with sizing the control.


  1. 我需要隐藏的视频部分,而只保留部分按钮和搜索栏。 (因为我跑音)

  1. I need to hide the video part, and keep only the part with buttons and seek bar. (since I run audio)

我需要调整 WindowsFormsHost 只显示这部分内容。

I need to adjust the WindowsFormsHost to only display this part.

我试图调整 WindowsFormsHost 手动,以便它只显示所需的部分,但是当我测试的程序在不同PC的它没有正常显示。从控制的一些部分被裁剪。

I tried to resize the WindowsFormsHost manually so that it only shows the required part, but when I tested the program on different pc's it wasn't displayed properly. Some parts from the control were cropped.

推荐答案

我知道你想隐藏的uiMOde视频

I know you want to hide the video with the uiMOde

awWindowsMediaPlayer.uiMode= "invisible";



不过,这种隐藏控制太...

But, this hide controls too...

对于我来说,有两种解决方法:

For me, you have two solutions:

第一,创建具有高度45pixel显示您axWindowsPlayer形式只是控制按钮

the first, you create your axWindowsPlayer form with 45pixel of height for display just the controls button.

秒,你隐藏所有的表单,并创建所有的按钮...

the seconds, you hide all the form, and create all your button...

您已经在控制按钮ACCES有:(样品播放按钮)

you've acces at the controls button with : (play button for sample)

axWindowsMediaPlayer.Ctlcontrols.play();



而你的存取权限的设置有:(体积样品)

And you've acces to the settings with : (volume for sample)

axWindowsMediaPlayer.settings.volume = 25;



我也看到了,这是可以定义一个定制uiMode,但我没有找到任何信息这...

I also saw that it was possible to define a custom uiMode, but I did not find any information about that...

这篇关于AxWindowsMediaPlayer大小在WPF应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆