I am trying to set perspective shadows for text using VSTO C# and am unable to do so. I tried to set msoTristate property of the text as below:
shape.TextFrame.TextRange.Paragraphs[j].Font.Shadow
This sets up only one kind of a shadow.
I also tried to set the ShadowFormat properties as shown below:
shape.TextFrame2.TextRange.Paragraphs[j].Font.Shadow.Blur //works fine
shape.TextFrame2.TextRange.Paragraphs[j].Font.Shadow.Type //throws an exception
I am able to get only one kind of shadow but am trying to get perspective shadows. Please help. Thanks in advance.
答案 0 :(得分:0)
透视阴影是传统阴影。可以使用枚举值MsoShadowType.msoShadow39通过MsoShadowType.msoShadow43设置它们。您可以发送操纵其他属性来调整透视阴影。
// Constructor of > SolutionA > ProjectB > Calling Class
public New() : base()
{
AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolve;
}
private Assembly AssemblyResolve(object sender, ResolveEventArgs e)
{
Assembly ass = null;
if (e.Name.StartsWith("MyCommonLib,")) {
string path = Assembly.GetExecutingAssembly.Location;
path = IO.Path.GetDirectoryName(path);
path = IO.Path.Combine(path, "MyCommonLib.dll");
if (IO.File.Exists(path)) {
ass = Assembly.LoadFile(path);
}
}
return ass;
}